Fix bug in NSLocale ISO codes methods.

This commit is contained in:
Stefan Bidigaray 2017-08-24 11:03:11 -04:00
parent 10b865e2d5
commit 952884dd6a
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2017-08-24 Stefan Bidigaray <stefanbidi@gmail.com>
* Source/NSLocale.m: Fix bug in ISO code methods.
2017-08-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURLProtocol.m: Fixed error where the presence of a

View file

@ -505,7 +505,7 @@ static NSRecursiveLock *classLock = nil;
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity: 10];
const char *const *codes = uloc_getISOCountries ();
while (codes != NULL)
while (*codes != NULL)
{
[array addObject: [NSString stringWithUTF8String: *codes]];
++codes;
@ -530,9 +530,9 @@ static NSRecursiveLock *classLock = nil;
if (nil == languages)
{
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity: 10];
const char *const *codes = uloc_getISOCountries ();
const char *const *codes = uloc_getISOLanguages ();
while (codes != NULL)
while (*codes != NULL)
{
[array addObject: [NSString stringWithUTF8String: *codes]];
++codes;