darwinvlc: fix automatic language selection (close #9914)
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 24 Nov 2013 19:35:05 +0000 (20:35 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 24 Nov 2013 19:35:05 +0000 (20:35 +0100)
bin/darwinvlc.c

index 33bb4f3..9bac3ca 100644 (file)
@@ -185,9 +185,11 @@ int main( int i_argc, const char *ppsz_argv[] )
                 lang = (char *)malloc(maxSize);
                 CFStringGetCString(language, lang, maxSize - 1, kCFStringEncodingUTF8);
             }
-            char tmp[11];
-            snprintf(tmp, 11, "LANG=%s", lang);
-            putenv(tmp);
+            if (strncmp( lang, "auto", 4 )) {
+                char tmp[11];
+                snprintf(tmp, 11, "LANG=%s", lang);
+                putenv(tmp);
+            }
             CFRelease(language);
         }
     }