From 859165ee97c6c0e8c9853379e2d08f4b286206f8 Mon Sep 17 00:00:00 2001 From: "rogerl%netscape.com" Date: Thu, 4 Nov 1999 00:00:14 +0000 Subject: [PATCH] Fix back-reference parsing from going too far in source string git-svn-id: svn://10.0.0.236/trunk@52757 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/rhino/org/mozilla/javascript/regexp/NativeRegExp.java | 1 + .../js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | 1 + 2 files changed, 2 insertions(+) diff --git a/mozilla/js/rhino/org/mozilla/javascript/regexp/NativeRegExp.java b/mozilla/js/rhino/org/mozilla/javascript/regexp/NativeRegExp.java index a0726a5cd15..373b9673b52 100644 --- a/mozilla/js/rhino/org/mozilla/javascript/regexp/NativeRegExp.java +++ b/mozilla/js/rhino/org/mozilla/javascript/regexp/NativeRegExp.java @@ -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 diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java b/mozilla/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java index a0726a5cd15..373b9673b52 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java @@ -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