X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2517b27a82b168e28a76fbf518f107c1c87cd63..f5ba273ecd799f652736ce2bc830283787302a56:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index acdc908251..d9ab373bdb 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -469,11 +469,15 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) } else { // a key const wxChar *pEnd = pStart; - while ( *pEnd != wxT('=') && !wxIsspace(*pEnd) ) { + while ( *pEnd && *pEnd != wxT('=') && !wxIsspace(*pEnd) ) { if ( *pEnd == wxT('\\') ) { // next character may be space or not - still take it because it's - // quoted + // quoted (unless there is nothing) pEnd++; + if ( !*pEnd ) { + // the error message will be given below anyhow + break; + } } pEnd++;