fixed bug in handling value names with escaped chars
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -468,20 +468,22 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // a key
|
else { // a key
|
||||||
size_t count = 0;
|
|
||||||
const wxChar *pEnd = pStart;
|
const wxChar *pEnd = pStart;
|
||||||
while ( *pEnd != wxT('=') && !wxIsspace(*pEnd) ) {
|
while ( *pEnd && *pEnd != wxT('=') && !wxIsspace(*pEnd) ) {
|
||||||
if ( *pEnd == wxT('\\') ) {
|
if ( *pEnd == wxT('\\') ) {
|
||||||
// next character may be space or not - still take it because it's
|
// next character may be space or not - still take it because it's
|
||||||
// quoted
|
// quoted (unless there is nothing)
|
||||||
pEnd++;
|
pEnd++;
|
||||||
|
if ( !*pEnd ) {
|
||||||
|
// the error message will be given below anyhow
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
|
||||||
pEnd++;
|
pEnd++;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString strKey(FilterInEntryName(wxString(pStart, count)));
|
wxString strKey(FilterInEntryName(wxString(pStart, pEnd)));
|
||||||
|
|
||||||
// skip whitespace
|
// skip whitespace
|
||||||
while ( isspace(*pEnd) )
|
while ( isspace(*pEnd) )
|
||||||
|
Reference in New Issue
Block a user