summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2001-06-19 14:15:17 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-19 17:22:20 +0000
commit0fe87f7cac1b476c6ed08653baf343a88f44d3b9 (patch)
treed2f1253284ade9f7df20a28e946aa72538b375fd /util.c
parent63b3d4d80da1fa704ffdd1b09a414d7dfe291659 (diff)
downloadperl-0fe87f7cac1b476c6ed08653baf343a88f44d3b9.tar.gz
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
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.c b/util.c
index 7a7d5f16d4..d3dbc163a6 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) {