From 1c68fb912d13e55b5627fdecfa8bb8f80e1ee23b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Oct 2000 18:20:54 +0000 Subject: [PATCH] fix for group names containing ']' git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fileconf.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(']') ) { -- 2.50.0