[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base: [NSString descriptionWithLocale:indent:to:]

From: Jonathan Gapen
Subject: Re: base: [NSString descriptionWithLocale:indent:to:]
Date: Thu, 19 Apr 2001 09:14:46 -0500

Michael Scheibler wrote:
> I think there is a bug in this function:
> - (void) descriptionWithLocale: (NSDictionary*)aLocale
>    indent: (unsigned)level
>        to: (id<GNUDescriptionDestination>)output
> {
>   if ([self rangeOfCharacterFromSet: quotables].length > 0)
>     {
>       const char *cstring = [self cString];    // <-- BUG; shouldn't it be
> lossyCString?

    No, it shouldn't use C strings at all.  The above code can lead to
an exception, but using lossyCString produces incorrect results. 
Instead, this code needs a re-write so it works with unichars.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]