Re: String causes NSLog to crash
Re: String causes NSLog to crash
- Subject: Re: String causes NSLog to crash
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 24 Feb 2006 11:00:04 -0800
In summary the following is the correct way to log an NSString...
> NSLog(@"%@", test);
The following is the wrong way to log an NSString, one that may cause
crashing or incorrect logging...
> NSLog(test);
Just like the following is the correct way to log a c-string...
printf("%s", test);
...and the following isn't...
printf(test);
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden