Fix _tputenv() return value test in wxSetEnv().

_tputenv() returns -1, not 0, on error, as all the other CRT functions, so the
test added by r72496 resulted in wxSetEnv() and wxUnsetEnv() always failing
when using MSVC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-27 13:58:26 +00:00
parent 6c51ca3750
commit d993c262a1

View File

@@ -636,7 +636,7 @@ bool wxDoSetEnv(const wxString& var, const wxChar *value)
envstr += '=';
if ( value )
envstr += value;
if ( !_tputenv(envstr.t_str()) )
if ( _tputenv(envstr.t_str()) != 0 )
return false;
#else // other compiler
if ( !::SetEnvironmentVariable(var.t_str(), value) )