summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-01-09 13:37:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-09 13:47:31 +0000
commit1ac24cf0d3ccfc0335a07abaf314aaac1d49705f (patch)
tree7aeb2dc1258be6ed7b7f9acf045e7978d1046330 /regexec.c
parenta0804c9e85747bb3f67fb765c9f7a6e0cb9e18d1 (diff)
downloadperl-1ac24cf0d3ccfc0335a07abaf314aaac1d49705f.tar.gz
Re: [ID 20020109.002] /(?m:...\s*$)/ is not backtracking properly
Message-Id: <200201091337.g09DbH519379@crypt.compulink.co.uk> p4raw-id: //depot/perl@14149
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 3e6ba65026..1bc998363c 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3586,7 +3586,7 @@ S_regmatch(pTHX_ regnode *prog)
n = regrepeat(scan, n);
locinput = PL_reginput;
if (ln < n && PL_regkind[(U8)OP(next)] == EOL &&
- (!PL_multiline || OP(next) == SEOL || OP(next) == EOS)) {
+ ((!PL_multiline && OP(next) != MEOL) || OP(next) == SEOL || OP(next) == EOS)) {
ln = n; /* why back off? */
/* ...because $ and \Z can match before *and* after
newline at the end. Consider "\n\n" =~ /\n+\Z\n/.