X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9869734d0431a29732006119f2d4ed35af70ca9b..b83290c3ebf1a7dbd8d1ec9e6fad248f5684d7b1:/src/msw/iniconf.cpp?ds=sidebyside diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index f5c1162378..1adae8ce22 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -60,12 +60,12 @@ wxIniConfig::wxIniConfig(const wxString& strAppName, const wxString& localFilename, const wxString& globalFilename, long style) - : wxConfigBase(!appName && wxTheApp ? wxTheApp->GetAppName() - : appName, - !vendorName ? (wxTheApp ? wxTheApp->GetVendorName() - : appName) - : vendorName, - strLocal, strGlobal, style), + : wxConfigBase(!strAppName && wxTheApp ? wxTheApp->GetAppName() + : strAppName, + !strVendor ? (wxTheApp ? wxTheApp->GetVendorName() + : strAppName) + : strVendor, + localFilename, globalFilename, style) { m_strLocalFilename = localFilename; if (m_strLocalFilename.IsEmpty()) @@ -442,9 +442,13 @@ bool wxIniConfig::DeleteAll() char szBuf[MAX_PATH]; size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf)); if ( nRc == 0 ) + { wxLogLastError("GetWindowsDirectory"); + } else if ( nRc > WXSIZEOF(szBuf) ) + { wxFAIL_MSG("buffer is too small for Windows directory."); + } wxString strFile = szBuf; strFile << '\\' << m_strLocalFilename;