]> granicus.if.org Git - onig/commitdiff
don't execute CASE_OP(FAIL) for failed case (label-fail)
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 9 Oct 2018 05:33:19 +0000 (14:33 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 9 Oct 2018 05:33:19 +0000 (14:33 +0900)
src/regexec.c

index 0d0660301f14e78a149b9cefe75222f96e89c771..757f6a28d00c7337b3aac99d4d3c6c6aad7b1981 100644 (file)
@@ -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;