X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8531cc2589161b92c1d8b607b0c13e4d1c8b6844..1dde66dda68a3d712d2f4de0388c4bb3a3375b36:/src/msw/utils.cpp?ds=inline diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index ca408de0a6..4ba9ff2a28 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -408,8 +408,7 @@ const wxChar* wxGetHomeDir(wxString *pstr) wxString strPath; ::GetModuleFileName(::GetModuleHandle(NULL), - strPath.GetWriteBuf(MAX_PATH), MAX_PATH); - strPath.UngetWriteBuf(); + wxStringBuffer(strPath, MAX_PATH), MAX_PATH); // extract the dir name wxSplitPath(strPath, &strDir, NULL, NULL); @@ -593,8 +592,8 @@ bool wxGetEnv(const wxString& var, wxString *value) if ( value ) { - (void)::GetEnvironmentVariable(var, value->GetWriteBuf(dwRet), dwRet); - value->UngetWriteBuf(); + (void)::GetEnvironmentVariable(var, wxStringBuffer(*value, dwRet), + dwRet); } return TRUE;