summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-02 03:51:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-02 03:51:50 +0000
commit58e68a3660c47739d7a70cc6f5cdebec030502d2 (patch)
treee66bc7e98dd9a64d633af4220bcae7e63994e1b8 /regex.c
parent58dd5de9664c57d72b45fd90a75f08fab506f208 (diff)
2000-03-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index 9988be2d2a..c273b29e59 100644
--- a/regex.c
+++ b/regex.c
@@ -4093,9 +4093,10 @@ re_match(bufp, string_arg, size, pos, regs)
case jump:
p1++;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+ if (mcnt >= 0) break; /* should be backward jump */
p1 += mcnt;
- if (p1 >= pend) break;
if (( is_a_jump_n && (enum regexpcode)*p1 == succeed_n) ||
(!is_a_jump_n && (enum regexpcode)*p1 == on_failure_jump)) {
if (failed_paren) {