• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem mac os X version 10.6 when using sprinft
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem mac os X version 10.6 when using sprinft


  • Subject: Re: Problem mac os X version 10.6 when using sprinft
  • From: Alastair Houghton <email@hidden>
  • Date: Mon, 10 May 2010 17:57:37 +0100

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



_______________________________________________

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

  • Follow-Ups:
    • RE: Problem mac os X version 10.6 when using sprinft
      • From: paul morel <email@hidden>
References: 
 >Problem mac os X version 10.6 when using sprinft (From: paul morel <email@hidden>)
 >Re: Problem mac os X version 10.6 when using sprinft (From: Fritz Anderson <email@hidden>)
 >Re: Problem mac os X version 10.6 when using sprinft (From: "Sean McBride" <email@hidden>)
 >Re: Problem mac os X version 10.6 when using sprinft (From: Alastair Houghton <email@hidden>)
 >Re: Problem mac os X version 10.6 when using sprinft (From: "Sean McBride" <email@hidden>)
 >RE: Problem mac os X version 10.6 when using sprinft (From: paul morel <email@hidden>)

  • Prev by Date: Re: Overriding text size in NSTextStorage
  • Next by Date: Re: Overriding text size in NSTextStorage
  • Previous by thread: Re: Problem mac os X version 10.6 when using sprinft
  • Next by thread: RE: Problem mac os X version 10.6 when using sprinft
  • Index(es):
    • Date
    • Thread