]> granicus.if.org Git - onig/commitdiff
fix setup called state values
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 23 Aug 2019 06:39:01 +0000 (15:39 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 23 Aug 2019 06:39:01 +0000 (15:39 +0900)
src/regcomp.c

index 44de0358eae13181a15dbbc9135b3f1c17596a26..2574f21db0fd6f4cfb1a95f6684a1e5014f70c7c 100644 (file)
@@ -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);