summaryrefslogtreecommitdiff
path: root/src/os/macosx
diff options
context:
space:
mode:
authoregladil <egladil@openttd.org>2007-11-07 21:35:33 +0000
committeregladil <egladil@openttd.org>2007-11-07 21:35:33 +0000
commit4e518e3cebdbcdf06a9b027d378b41c4aa79d8f6 (patch)
treebe0a6d5de09021779c127a919cfe99eac6421412 /src/os/macosx
parentf5024f8c91899fe227483ef329b5998969b6bb23 (diff)
downloadopenttd-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.mm2
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;
}