]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
Fix cvs conflict.
[wxWidgets.git] / src / common / strconv.cpp
index 54064c7064c9b705642245f1cb07c08783ef656f..1b69297e1d0e1464197178f8e1434d0c295ee8b3 100644 (file)
@@ -758,12 +758,18 @@ void wxCSConv::LoadNow()
                 // try to see if it's in the environment variables
                 // (in most cases this won't work, but I was out of ideas)
                 wxChar *lang = wxGetenv(wxT("LC_ALL"));
-                if (!lang) 
+                wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
+                if (!dot)
+                {
                     lang = wxGetenv(wxT("LC_CTYPE"));
-                if (!lang) 
+                    dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
+                }
+                if (!dot)
+                {
                     lang = wxGetenv(wxT("LANG"));
-                wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
-                if (dot) 
+                    dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
+                }
+                if (dot)
                     SetName(dot+1);
             }
 #endif