diff --git a/regexec.c b/regexec.c index 6ac18bc33e..4582c35c3f 100644 --- a/regexec.c +++ b/regexec.c @@ -2501,6 +2501,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;