Fix behaviour introduced in
70b673eb7, where regexps with
possessive quantifier("*+") didn't match.
* lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked
only when we have a fail stack.
Fixes: 70b673eb7 ("regex: fix longstanding backref match bug")
Signed-off-by: Egor Ignatov <egori@altlinux.org>
update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
- || re_node_set_contains (&eps_via_nodes, cur_node))
+ || (fs && re_node_set_contains (&eps_via_nodes, cur_node)))
{
Idx reg_idx;
cur_node = -1;