Undo captures from failed OPT child

This commit is contained in:
rogerl%netscape.com 1999-08-11 04:34:52 +00:00
parent f5682225f9
commit 9d49971dfa
2 changed files with 6 additions and 2 deletions

View File

@ -1364,8 +1364,10 @@ public class NativeRegExp extends ScriptableObject implements Function {
}
int kidMatch = matchRENodes(state, (RENode)ren.kid,
ren.next, input, index);
if (kidMatch == -1)
if (kidMatch == -1) {
state.parenCount = saveNum;
break;
}
else {
int restMatch = matchRENodes(state, ren.next,
stop, input, kidMatch);

View File

@ -1364,8 +1364,10 @@ public class NativeRegExp extends ScriptableObject implements Function {
}
int kidMatch = matchRENodes(state, (RENode)ren.kid,
ren.next, input, index);
if (kidMatch == -1)
if (kidMatch == -1) {
state.parenCount = saveNum;
break;
}
else {
int restMatch = matchRENodes(state, ren.next,
stop, input, kidMatch);