Re: problem with NSString, UTF8, pathnames
Re: problem with NSString, UTF8, pathnames
- Subject: Re: problem with NSString, UTF8, pathnames
- From: "Clark Cox" <email@hidden>
- Date: Thu, 25 Oct 2007 12:07:36 -0700
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:
This email sent to email@hidden