X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.c;h=2da9911d92848015d9310069b78f2081aa1aecff;hb=a65e9df7d11c78917193138b8249299b47efd8b4;hp=fd4633ba9f35cda66e76711bbafa9c0084f674bd;hpb=b45f050a81173020b0089d3ff02fa0276958461a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.c b/regcomp.c index fd4633b..2da9911 100644 --- a/regcomp.c +++ b/regcomp.c @@ -2190,14 +2190,14 @@ S_reg(pTHX_ I32 paren, I32 *flagp) if (paren) { PL_regflags = oregflags; if (PL_regcomp_parse >= PL_regxend || *nextchar() != ')') { - PL_regcomp_parse++; - vFAIL("Unmatched ("); + PL_regcomp_parse = oregcomp_parse; + vFAIL("Unmatched ("); } } else if (!paren && PL_regcomp_parse < PL_regxend) { if (*PL_regcomp_parse == ')') { - PL_regcomp_parse = oregcomp_parse; - vFAIL("Unmatched ("); + PL_regcomp_parse++; + vFAIL("Unmatched )"); } else FAIL("Junk on end of regexp"); /* "Can't happen". */ @@ -2704,8 +2704,8 @@ tryagain: if (num > 9 && num >= PL_regnpar) goto defchar; else { - while (isDIGIT(*PL_regcomp_parse)) - PL_regcomp_parse++; + while (isDIGIT(*PL_regcomp_parse)) + PL_regcomp_parse++; if (!SIZE_ONLY && num > PL_regcomp_rx->nparens) vFAIL("Reference to nonexistent group");