diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2000-11-17 12:28:02 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-18 00:32:54 +0000 |
commit | cb434fcc98ac25f5b12abd45117055b5f6caa477 (patch) | |
tree | 271f4814cbed3c622df6c7d6df0a80542cca6454 /regexec.c | |
parent | 2f3a5373a206f22b10d28792b4ecbe362c59c3bd (diff) | |
download | perl-cb434fcc98ac25f5b12abd45117055b5f6caa477.tar.gz |
restore match data on backtracing
Message-ID: <20001117172802.A1032@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@7733
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2596,12 +2596,18 @@ S_regmatch(pTHX_ regnode *prog) case CURLYX: { CURCUR cc; CHECKPOINT cp = PL_savestack_ix; + /* No need to save/restore up to this paren */ + I32 parenfloor = scan->flags; if (OP(PREVOPER(next)) == NOTHING) /* LONGJMP */ next += ARG(next); cc.oldcc = PL_regcc; PL_regcc = &cc; - cc.parenfloor = *PL_reglastparen; + /* XXXX Probably it is better to teach regpush to support + parenfloor > PL_regsize... */ + if (parenfloor > *PL_reglastparen) + parenfloor = *PL_reglastparen; /* Pessimization... */ + cc.parenfloor = parenfloor; cc.cur = -1; cc.min = ARG1(scan); cc.max = ARG2(scan); |