Re: [PATCH] Further tweaks to make it easier to create regexp engine plug ins.
Yves Orton [Tue, 5 Dec 2006 22:53:48 +0000 (23:53 +0100)]
Message-ID: <9b18b3110612051353k7745792byabfdf98e18eb48c9@mail.gmail.com>

Fixes a minor bug in change 29468.

p4raw-id: //depot/perl@29472

regcomp.c

index 1611eb4..e58c242 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8707,7 +8707,7 @@ Perl_re_dup(pTHX_ const regexp *r, CLONE_PARAMS *param)
     Newx(ret->endp, npar, I32);
     Copy(r->endp, ret->endp, npar, I32);
 
-    if (ret->substrs) {
+    if (r->substrs) {
         Newx(ret->substrs, 1, struct reg_substr_data);
         for (s = ret->substrs->data, i = 0; i < 3; i++, s++) {
             s->min_offset = r->substrs->data[i].min_offset;