X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57436bb7dbd331de64d05007960aa1fc966f8de9..3ae00f5b5756cb67631400628acc94dd23fe03d7:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index c70e7e5a5c..d492e6466d 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1160,9 +1160,6 @@ bool wxFileConfig::DeleteAll() m_strLocalFile.c_str()); return false; } - - m_strLocalFile = - m_strGlobalFile = wxEmptyString; } Init(); @@ -2030,8 +2027,11 @@ static wxString FilterInEntryName(const wxString& str) strResult.Alloc(str.Len()); for ( const wxChar *pc = str.c_str(); *pc != '\0'; pc++ ) { - if ( *pc == wxT('\\') ) - pc++; + if ( *pc == wxT('\\') ) { + // we need to test it here or we'd skip past the NUL in the loop line + if ( *++pc == _T('\0') ) + break; + } strResult += *pc; }