Fix back-reference parsing from going too far in source string

This commit is contained in:
rogerl%netscape.com 1999-11-04 00:00:14 +00:00
parent dc6e27e8c1
commit 5d229c958c
2 changed files with 2 additions and 0 deletions

View File

@ -1142,6 +1142,7 @@ public class NativeRegExp extends ScriptableObject implements Function {
num = 10 * num + unDigit(c);
len++;
}
index--;
ren = new RENode(state, REOP_BACKREF, null);
ren.num = num - 1; /* \1 is numbered 0, etc. */
/* Avoid common chr- and flags-setting

View File

@ -1142,6 +1142,7 @@ public class NativeRegExp extends ScriptableObject implements Function {
num = 10 * num + unDigit(c);
len++;
}
index--;
ren = new RENode(state, REOP_BACKREF, null);
ren.num = num - 1; /* \1 is numbered 0, etc. */
/* Avoid common chr- and flags-setting