On 10/25/07, James Stein <email@hidden> wrote:
> To my surprise:
> an NSString returned by Cocoa will cause NSLog to crash.
> Details:
[snip]
> But whatever, is there a workaround, or must I consider this as harmful?
> NSLog( [validCocoaObject description] );
It is harmful, always use this:
NSLog(@"%@", [validCocoaObject description] );
The same goes for any printf-like function: if there is any chance
that the string might contain '%', don't pass it as the first
parameter.
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden