[vlc-commits] macosx: fixed potential crashes when localizing strings
Felix Paul Kühne
git at videolan.org
Sun Jan 29 23:44:50 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jan 29 23:44:29 2012 +0100| [fb5766e398fa651791f5b7b7071a04ec175d9e5f] | committer: Felix Paul Kühne
macosx: fixed potential crashes when localizing strings
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb5766e398fa651791f5b7b7071a04ec175d9e5f
---
modules/gui/macosx/intf.h | 2 +-
modules/gui/macosx/intf.m | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index e4be09f..f79efbf 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -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 */
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 93bd22b..b9afbf1 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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 )
{
More information about the vlc-commits
mailing list