summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-13 05:50:54 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-13 05:50:54 (GMT)
commit24d38cc447ee122c07208cf87a7899fe77792b02 (patch)
treeb61a601c5cc4639edd1195e670afe7a4e3c897db /regexec.c
parent0c467565ca9b9e9f3f99010044aa839eb1631454 (diff)
regexec.c: invalidate previously matched position
* regexec.c (match_at): invalidate end position not yet matched when new start position is pushed, to dispose previously stored position. [ruby-core:83743] [Bug #14101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index 9e5f559..983b0a1 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2506,6 +2506,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
CASE(OP_MEMORY_START) MOP_IN(OP_MEMORY_START);
GET_MEMNUM_INC(mem, p);
mem_start_stk[mem] = (OnigStackIndex )((void* )s);
+ mem_end_stk[mem] = INVALID_STACK_INDEX;
MOP_OUT;
JUMP;