From 860f6e42ea4e80da6afb405588d635bf281eafa5 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Tue, 9 Oct 2018 14:33:19 +0900 Subject: [PATCH] don't execute CASE_OP(FAIL) for failed case (label-fail) --- src/regexec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/regexec.c b/src/regexec.c index 0d06603..757f6a2 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -3944,10 +3944,17 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, goto finish; NEXT_OP; +#ifdef ONIG_DEBUG_STATISTICS fail: SOP_OUT; - /* fall */ + goto fail2; +#endif CASE_OP(FAIL) +#ifdef ONIG_DEBUG_STATISTICS + fail2: +#else + fail: +#endif STACK_POP; p = stk->u.state.pcode; s = stk->u.state.pstr; -- 2.50.1