]> git.saurik.com Git - wxWidgets.git/commitdiff
removed assert which could be provoked by correct code
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Jul 2001 15:17:09 +0000 (15:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Jul 2001 15:17:09 +0000 (15:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/regex.cpp

index 46eb372cfb48d852bd2b6e95989c1d1c3639a84b..c03e61260143e2e163b053f225d3499c82143f7b 100644 (file)
@@ -313,7 +313,17 @@ int wxRegExImpl::Replace(wxString *text,
                     size_t start, len;
                     if ( !GetMatch(&start, &len, index) )
                     {
-                        wxFAIL_MSG( _T("invalid back reference") );
+                        // we can't do it because GetMatch() returns FALSE
+                        // even for a valid back reference index if it didn't
+                        // match for this expression (e.g. it when alternative
+                        // branches were used and the one contained the back
+                        // ref didn't match)
+                        //
+                        // it would be better to distinguish between this case
+                        // and really invalid index, but I don't know how to
+                        // do it
+
+                        //wxFAIL_MSG( _T("invalid back reference") );
 
                         // just eat it...
                     }