X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a434b1015342838eb38e95a5040cc50ce03911a..d2fd6629831b1b25e739f73cdc2157eed840f273:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index a05b15e438..2e04e80098 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1574,8 +1574,12 @@ wxString wxGetOSDirectory() #ifdef __WXWINCE__ return wxString(wxT("\\Windows")); #elif defined(__WINDOWS__) && !defined(__WXMICROWIN__) - wxChar buf[256]; - GetWindowsDirectory(buf, 256); + wxChar buf[MAX_PATH]; + if ( !GetWindowsDirectory(buf, MAX_PATH) ) + { + wxLogLastError(wxS("GetWindowsDirectory")); + } + return wxString(buf); #elif defined(__WXMAC__) && wxOSX_USE_CARBON return wxMacFindFolderNoSeparator(kOnSystemDisk, 'macs', false);