]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/config.cpp
Add missing Contains overload
[wxWidgets.git] / src / common / config.cpp
index 4b509a7fc0d8a41eaf22e3538e171d801b7ad8fc..1f2134beecc5ec4f35c47c02c122d5dbb015150d 100644 (file)
@@ -369,7 +369,12 @@ wxString wxExpandEnvVars(const wxString& str)
 #ifdef __WXWINCE__
           const wxChar *pszValue = NULL;
 #else
-          const wxChar *pszValue = wxGetenv(strVarName);
+          // NB: use wxGetEnv instead of wxGetenv as otherwise variables
+          //     set through wxSetEnv may not be read correctly!
+          const wxChar *pszValue = NULL;
+          wxString tmp;
+          if (wxGetEnv(strVarName, &tmp))
+              pszValue = tmp;
 #endif
           if ( pszValue != NULL ) {
             strResult += pszValue;