]> git.sesse.net Git - vlc/commitdiff
macosx: fixed potential crashes when localizing strings
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 29 Jan 2012 22:44:29 +0000 (23:44 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 29 Jan 2012 22:44:29 +0000 (23:44 +0100)
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index e4be09fc870d47c99cc1be1aa4d68de966791a41..f79efbf6e5a500333900d29dd279a72e00d3a863 100644 (file)
@@ -48,7 +48,7 @@ unsigned int CocoaKeyToVLC( unichar i_key );
 
 #define VLCIntf [[VLCMain sharedInstance] intf]
 
-#define _NS(s) [[VLCMain sharedInstance] localizedString: _(s)]
+#define _NS(s) [[VLCMain sharedInstance] localizedString: s]
 /* Get an alternate version of the string.
  * This string is stored as '1:string' but when displayed it only displays
  * the translated string. the translation should be '1:translatedstring' though */
index 93bd22b49edfb1c7217c9fb2801d1503ed2af1bd..b9afbf1d40fa7b857e54b2942bb4c39a6f322348 100644 (file)
@@ -1000,7 +1000,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     if( psz != NULL )
     {
-        o_str = [NSString stringWithCString: psz encoding:NSUTF8StringEncoding];
+        o_str = [NSString stringWithCString: _(psz) encoding:NSUTF8StringEncoding];
 
         if( o_str == NULL )
         {