: fix: [perl #39583] Pattern Match fails for specific length string
Yves Orton [Fri, 23 Jun 2006 11:54:19 +0000 (13:54 +0200)]
Message-ID: <9b18b3110606230254m6afd620bjde6322aefda6f199@mail.gmail.com>

p4raw-id: //depot/perl@28417

regexec.c

index a40124b..195ab25 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -4396,9 +4396,10 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog)
                                sayNO;
                        }
                        /* PL_reginput == locinput now */
+                       PL_reginput = locinput; /* Could be reset... */
                        TRYPAREN(st->u.plus.paren, st->ln, locinput, PLUS1);
                        /*** all unsaved local vars undefined at this point */
-                       PL_reginput = locinput; /* Could be reset... */
+
                        REGCP_UNWIND(st->u.plus.lastcp);
                        /* Couldn't or didn't -- move forward. */
                        st->u.plus.old = locinput;