diff options
author | egladil <egladil@openttd.org> | 2007-11-07 21:35:33 +0000 |
---|---|---|
committer | egladil <egladil@openttd.org> | 2007-11-07 21:35:33 +0000 |
commit | 4e518e3cebdbcdf06a9b027d378b41c4aa79d8f6 (patch) | |
tree | be0a6d5de09021779c127a919cfe99eac6421412 /src/os/macosx | |
parent | f5024f8c91899fe227483ef329b5998969b6bb23 (diff) | |
download | openttd-4e518e3cebdbcdf06a9b027d378b41c4aa79d8f6.tar.xz |
(svn r11389) -Fix [FS#1386]: Replace calls to deprecated API with newer ones and handle broken iconv declaration in OSX 10.5.
Diffstat (limited to 'src/os/macosx')
-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; } |