X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regexec.c;h=93fadab5843a208e017d04be72f54737d5051bee;hb=eb1c4873a4d2b3d386b680baf0b251a75d67e654;hp=58d973a80f4e3f6b619c2f5df56f5e0b1888ea84;hpb=34a81e2b89e80eb8560606e2b29037d4da625156;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regexec.c b/regexec.c index 58d973a..93fadab 100644 --- a/regexec.c +++ b/regexec.c @@ -4478,8 +4478,11 @@ NULL cur_eval->u.eval.close_paren == (U32)ST.me->flags) goto fake_end; - if ( ST.count < (ST.minmod ? ARG1(ST.me) : ARG2(ST.me)) ) - goto curlym_do_A; /* try to match another A */ + { + I32 max = (ST.minmod ? ARG1(ST.me) : ARG2(ST.me)); + if ( max == REG_INFTY || ST.count < max ) + goto curlym_do_A; /* try to match another A */ + } goto curlym_do_B; /* try to match B */ case CURLYM_A_fail: /* just failed to match an A */