From: Ilya Zakharevich Date: Thu, 28 May 1998 01:28:54 +0000 (-0400) Subject: Re: 5.004_65 uninitialized variable regexec.c (2) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f4b28b29039444aa4497be41d052e0fe0128ede;p=p5sagit%2Fp5-mst-13.2.git Re: 5.004_65 uninitialized variable regexec.c (2) p4raw-id: //depot/perl@1101 --- diff --git a/regexec.c b/regexec.c index a38e97d..ac9f37b 100644 --- a/regexec.c +++ b/regexec.c @@ -1283,7 +1283,7 @@ regmatch(regnode *prog) minmod = 0; if (ln && regrepeat_hard(scan, ln, &l) < ln) sayNO; - if (l == 0 && n >= ln + if (ln && l == 0 && n >= ln /* In fact, this is tricky. If paren, then the fact that we did/didnot match may influence future execution. */ @@ -1301,6 +1301,7 @@ regmatch(regnode *prog) } else c1 = c2 = -1000; REGCP_SET; + /* This may be improved if l == 0. */ while (n >= ln || (n == REG_INFTY && ln > 0 && l)) { /* ln overflow ? */ /* If it could work, try it. */ if (c1 == -1000 ||