diff options
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/macosx/macos.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index 5defc392d..22bf8a987 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -168,6 +168,6 @@ const char *GetCurrentLocale(const char *) NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [languages objectAtIndex:0]; /* preferredLang is either 2 or 5 characters long ("xx" or "xx_YY"). */ - strncpy(retbuf, [preferredLang cString], 31); + [ preferredLang getCString:retbuf maxLength:32 encoding:NSASCIIStringEncoding ]; return retbuf; } |