Patch from Dan Lewisi
authorMiguel de Icaza <miguel@gnome.org>
Wed, 1 Oct 2003 21:51:20 +0000 (21:51 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 1 Oct 2003 21:51:20 +0000 (21:51 -0000)
Carlos' bug seems to stem from my failure to interpolate
the "$$" substitution pattern properly.

This fixes bug #48666

svn path=/trunk/mcs/; revision=18492

mcs/class/System/System.Text.RegularExpressions/replace.cs

index 88b99f394bccf2c27a036caecf0ab9437f84455b..14f53a52f88bd7f1d02780a9a85b7b4e05efa414 100644 (file)
@@ -47,12 +47,10 @@ namespace System.Text.RegularExpressions {
                                c = replacement[ptr ++];\r
 \r
                                if (c == '$') {\r
-                                       if (replacement[ptr] == '$') {\r
+                                       if (replacement[ptr] != '$') \r
+                                               term = CompileTerm (replacement, ref ptr);\r
+                                       else\r
                                                ++ ptr;\r
-                                               break;\r
-                                       }\r
-\r
-                                       term = CompileTerm (replacement, ref ptr);\r
                                }\r
 \r
                                if (term != null) {\r