pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src system.cxx,1.15,1.16


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src system.cxx,1.15,1.16
Date: 13 Apr 2003 12:30:12 -0000

Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv24519

Modified Files:
        system.cxx 
Log Message:
added handling for setlocale returning NULL

Index: system.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/system.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- system.cxx  13 Apr 2003 10:34:55 -0000      1.15
+++ system.cxx  13 Apr 2003 12:30:10 -0000      1.16
@@ -343,7 +343,11 @@
 std::string
 System::get_language()
 {
-  std::string lang = setlocale(LC_MESSAGES, NULL);
+  char* lang_c = setlocale(LC_MESSAGES, NULL);
+  std::string lang;
+  
+  if (lang_c)
+    lang = lang_c;
   
   if (lang.empty() || lang == "C")
     return default_language;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]