From: K.Kosako Date: Mon, 7 Aug 2017 02:26:07 +0000 (+0900) Subject: fix for reluctant repetition in Absent expression X-Git-Tag: v6.6.0~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27e43a4eaa81b3769784c40a7b1230005c42e505;p=onig fix for reluctant repetition in Absent expression --- diff --git a/src/regparse.c b/src/regparse.c index db9ca71..5dc0dfb 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1752,6 +1752,9 @@ is_simple_one_char_repeat(Node* node, Node** rquant, Node** rbody, return 0; } + if (QUANT_(quant)->greedy == 0) + return 0; + body = NODE_BODY(quant); switch (NODE_TYPE(body)) { case NODE_STRING: