From: Hugo van der Sanden Date: Tue, 19 Jun 2001 13:15:17 +0000 (+0100) Subject: Re: [ID 20010618.006] some end-anchored regexps hang when using study X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0fe87f7cac1b476c6ed08653baf343a88f44d3b9;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010618.006] some end-anchored regexps hang when using study Message-Id: <200106191215.NAA17691@crypt.compulink.co.uk> p4raw-id: //depot/perl@10724 --- diff --git a/util.c b/util.c index 7a7d5f1..d3dbc16 100644 --- a/util.c +++ b/util.c @@ -781,8 +781,14 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift /* The value of pos we can stop at: */ stop_pos = SvCUR(bigstr) - end_shift - (SvCUR(littlestr) - 1 - previous); if (previous + start_shift > stop_pos) { +/* + stop_pos does not include SvTAIL in the count, so this check is incorrect + (I think) - see [ID 20010618.006] and t/op/study.t. HVDS 2001/06/19 +*/ +#if 0 if (previous + start_shift == stop_pos + 1) /* A fake '\n'? */ goto check_tail; +#endif return Nullch; } while (pos < previous + start_shift) {