From: Vadim Zeitlin Date: Mon, 2 Oct 2000 18:20:54 +0000 (+0000) Subject: fix for group names containing ']' X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1c68fb912d13e55b5627fdecfa8bb8f80e1ee23b fix for group names containing ']' git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index a6916f0995..643dd14fdf 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -431,8 +431,15 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) pEnd = pStart; while ( *++pEnd != wxT(']') ) { - if ( *pEnd == wxT('\n') || *pEnd == wxT('\0') ) + if ( *pEnd == wxT('\\') ) { + // the next char is escaped, so skip it even if it is ']' + pEnd++; + } + + if ( *pEnd == wxT('\n') || *pEnd == wxT('\0') ) { + // we reached the end of line, break out of the loop break; + } } if ( *pEnd != wxT(']') ) {