X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2c7e39b9bc603738a8aebd4b4838b398b175daa..193fe9890411e788f41648b95280d8979b378189:/src/msw/iniconf.cpp?ds=sidebyside diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index 22199a3f39..1adae8ce22 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -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;