summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-01-09 20:16:54 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-09 19:59:28 +0000
commit15272685321a1d817e718f8bbfc43bbedd9f4460 (patch)
treed2f4261f858719b8008b47d3b353d3441d1cabec /regexec.c
parentd85850a777b87feb3a01d2328aa281372642877e (diff)
downloadperl-15272685321a1d817e718f8bbfc43bbedd9f4460.tar.gz
Re: [ID 20020109.002] /(?m:...\s*$)/ is not backtracking properly
Message-Id: <200201092016.g09KGsi30119@crypt.compulink.co.uk> p4raw-id: //depot/perl@14157
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 1bc998363c..bdd7c0db8f 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3586,7 +3586,9 @@ 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) != MEOL) || 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/.