summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-21 08:07:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-21 08:07:46 +0000
commitb3b7b7200c4215f9982672f39a45cc17627616e9 (patch)
tree005433de49beb9566d8f822f253c5c1cc4fac592 /regex.c
parenta8852f4ad9b57d829de228034258634beeb52ff9 (diff)
regexp (?:xxx) bug. too manu pops
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@38 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 0fdf2c0..152eebb 100644
--- a/regex.c
+++ b/regex.c
@@ -1398,6 +1398,7 @@ re_compile_pattern(pattern, size, bufp)
store_jump(fixup_jump, jump, b);
BUFPUSH(stop_memory);
BUFPUSH(stackp[-1]);
+ stackp--;
break;
case '!':
@@ -1412,13 +1413,13 @@ re_compile_pattern(pattern, size, bufp)
STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
BUFPUSH(0); /* space to hold stack pos */
BUFPUSH(0);
+ stackp--;
break;
case ':':
default:
break;
}
- stackp--;
begalt = *--stackp + bufp->buffer;
stackp--;
fixup_jump = *stackp ? *stackp + bufp->buffer - 1 : 0;