]> granicus.if.org Git - onig/commitdiff
fix invalid condition for setting of head_exact value
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 19 Feb 2019 02:26:31 +0000 (11:26 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 28 Feb 2019 05:28:18 +0000 (14:28 +0900)
src/regcomp.c

index 99e13d3925fa4b663a0f64b81aeee872d4bd07a8..f44ac5cdc14206364c995ebf4c48892972792464 100644 (file)
@@ -4451,7 +4451,7 @@ setup_quant(Node* node, regex_t* reg, int state, ScanEnv* env)
   }
 
 #ifdef USE_OP_PUSH_OR_JUMP_EXACT
-  if (qn->greedy && (qn->body_empty_info != QUANT_BODY_IS_NOT_EMPTY)) {
+  if (qn->greedy && (qn->body_empty_info == QUANT_BODY_IS_NOT_EMPTY)) {
     if (NODE_TYPE(body) == NODE_QUANT) {
       QuantNode* tqn = QUANT_(body);
       if (IS_NOT_NULL(tqn->head_exact)) {