fix for wxGetEnv() under Win16 (!) (bug 645368)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -600,14 +600,16 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
|||||||
{
|
{
|
||||||
#ifdef __WIN16__
|
#ifdef __WIN16__
|
||||||
const wxChar* ret = wxGetenv(var);
|
const wxChar* ret = wxGetenv(var);
|
||||||
if (ret)
|
if ( !ret )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if ( value )
|
||||||
{
|
{
|
||||||
*value = ret;
|
*value = ret;
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return FALSE;
|
return TRUE;
|
||||||
#else
|
#else // Win32
|
||||||
// first get the size of the buffer
|
// first get the size of the buffer
|
||||||
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
||||||
if ( !dwRet )
|
if ( !dwRet )
|
||||||
@@ -623,7 +625,7 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#endif
|
#endif // Win16/32
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSetEnv(const wxString& var, const wxChar *value)
|
bool wxSetEnv(const wxString& var, const wxChar *value)
|
||||||
|
Reference in New Issue
Block a user