From bf70582cf30ae6f715769c519f451411f5d2a577 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 23 Feb 2000 05:23:12 +0000 Subject: 2000-02-23 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'regex.c') diff --git a/regex.c b/regex.c index 0ee2b066d3..60e23e038d 100644 --- a/regex.c +++ b/regex.c @@ -4194,9 +4194,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) { -- cgit v1.2.3