Well, I'll use the NSString and things like that it will be safer for sure but 
I just wanted to see where the problem came from. 
Anyway,thanks again for your help,
Paul

> Subject: Re: Problem mac os X version 10.6 when using sprinft
> From: alast...@alastairs-place.net
> Date: Mon, 10 May 2010 17:57:37 +0100
> CC: s...@rogue-research.com; fri...@manoverboard.org; 
> cocoa-dev@lists.apple.com
> To: elbomber...@hotmail.com
> 
> On 10 May 2010, at 16:54, paul morel wrote:
> 
> > Hi everybody,
> > thanks a lot for your help. 
> > Actually you were right it size a problem of size. I increased the size and 
> > it works.
> 
> See, that worries me.
> 
> > The size was 20 because I thought that '\t'  or other thing like that were 
> > considered directly as the 'final value', i.e. a space for example. And the 
> > value of n1 is 3.   
> > But what is weird is that it seems that with Mac OS X 10.5 there is no 
> > problem, whereas when I use Mac OS 10.6 the problem occurs. 
> > Anyway i understand now,
> 
> Well, do you?  Increasing the size is only the right fix if you really 
> understand what the size should be and why.  Using snprintf() doesn't always 
> save you because it might truncate the result, which may or may not cause 
> other problems (though at least you won't have a buffer overflow).
> 
> I'd use NSString if I were you---it's safer.
> 
> Kind regards,
> 
> Alastair.
> 
> -- 
> http://alastairs-place.net
> 
> 
> 
                                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to