From: K.Kosako Date: Tue, 9 Oct 2018 05:33:19 +0000 (+0900) Subject: don't execute CASE_OP(FAIL) for failed case (label-fail) X-Git-Tag: v6.9.1~18^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=860f6e42ea4e80da6afb405588d635bf281eafa5;p=onig don't execute CASE_OP(FAIL) for failed case (label-fail) --- 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;