summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-23 05:23:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-23 05:23:12 +0000
commit1a4e6e9708b4cdc426ebd1226a7f10f8e4259b75 (patch)
treeb3eb8e2975df384946ad70572e1e3387a6c3127c /regex.c
parentc56fc4a0e859bef2202e60c8e48834dfd4bf5034 (diff)
downloadruby-1a4e6e9708b4cdc426ebd1226a7f10f8e4259b75.tar.gz
ruby-1a4e6e9708b4cdc426ebd1226a7f10f8e4259b75.tar.xz
ruby-1a4e6e9708b4cdc426ebd1226a7f10f8e4259b75.zip
2000-02-23
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@624 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 0ee2b066d..60e23e038 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) {