diff options
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -9316,7 +9316,10 @@ NULL /* avoid taking address of locinput, so it can remain * a register var */ char *li = locinput; - ST.count = regrepeat(rex, &li, ST.A, loceol, reginfo, ST.max); + if (ST.max) + ST.count = regrepeat(rex, &li, ST.A, loceol, reginfo, ST.max); + else + ST.count = 0; if (ST.count < ST.min) sayNO; SET_locinput(li); @@ -10058,6 +10061,8 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, unsigned int to_complement = 0; /* Invert the result? */ char_class_number_ classnum; + assert(max); + PERL_ARGS_ASSERT_REGREPEAT; /* This routine is structured so that we switch on the input OP. Each OP |