]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for group names containing ']'
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Oct 2000 18:20:54 +0000 (18:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Oct 2000 18:20:54 +0000 (18:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fileconf.cpp

index a6916f099510149296ac39a57df70a61ca3058d1..643dd14fdfdef8b588ea15e1d6803dfbd3132fb6 100644 (file)
@@ -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(']') ) {