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
commitcd5597dddf6ec33d9c2bd1db1a892267e9acbc9e (patch)
treebe0a6d5de09021779c127a919cfe99eac6421412 /src/os/macosx
parent015454198226049694037f1b85af0b6d44318351 (diff)
downloadopenttd-cd5597dddf6ec33d9c2bd1db1a892267e9acbc9e.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;
}