From: K.Kosako Date: Fri, 23 Aug 2019 06:39:01 +0000 (+0900) Subject: fix setup called state values X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=616551f5567a275905f667480922d5c8610df67b;p=onig fix setup called state values --- diff --git a/src/regcomp.c b/src/regcomp.c index 44de035..2574f21 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -4430,6 +4430,8 @@ setup_called_state_call(Node* node, int state) } } else if (en->type == BAG_IF_ELSE) { + state |= IN_ALT; + setup_called_state_call(NODE_BODY(node), state); if (IS_NOT_NULL(en->te.Then)) { setup_called_state_call(en->te.Then, state); } @@ -4486,6 +4488,7 @@ setup_called_state(Node* node, int state) setup_called_state(NODE_BODY(node), state); break; case BAG_IF_ELSE: + state |= IN_ALT; setup_called_state(NODE_BODY(node), state); if (IS_NOT_NULL(en->te.Then)) setup_called_state(en->te.Then, state);