Branch: refs/heads/yves/fix_zero_max_quantifier_in_regexec_c
  Home:   https://github.com/Perl/perl5
  Commit: 03f1967fa2c87655c84dbb3cdec9a65d262cabf2
      
https://github.com/Perl/perl5/commit/03f1967fa2c87655c84dbb3cdec9a65d262cabf2
  Author: Yves Orton <[email protected]>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M regexec.c
    M t/re/subst.t

  Log Message:
  -----------
  regexec.c - avoid calling regrepeat when the max is 0

When we have a max quantifier of 0, then the quantified
item is essentially a NOTHING reop. Regardless, we do not
need to call regrepeat, and doing so confuses some of the
logic it contains. Simply avoiding calling regrepeat()
fixes the underlying issue, and avoids the broken code.

This fixes GH Issue #20690.


Reply via email to