]> granicus.if.org Git - onig/commitdiff
fix return value check in recursive_call_check_trav()
authorK.Kosako <kosako@sofnec.co.jp>
Thu, 15 Jun 2017 00:32:15 +0000 (09:32 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 15 Jun 2017 00:32:15 +0000 (09:32 +0900)
src/regcomp.c

index 696c189cc8cc62636d9064a2dc2f96445bb35e2f..5d7943fedc4c230cbfe8155930bf66db67cdc74d 100644 (file)
@@ -2991,12 +2991,15 @@ recursive_call_check_trav(Node* node, ScanEnv* env, int state)
     }
 
     {
+      int ret;
       int state1 = state;
 
       if (NODE_IS_RECURSION(node))
         state1 |= IN_RECURSION;
 
-      (void) recursive_call_check_trav(NODE_BODY(node), env, state1);
+      ret = recursive_call_check_trav(NODE_BODY(node), env, state1);
+      if (ret == FOUND_CALLED_NODE)
+        r = FOUND_CALLED_NODE;
     }
     break;