summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2009-12-09 17:40:05 -0500
committerJesse Vincent <jesse@bestpractical.com>2009-12-09 17:40:05 -0500
commit85613cabfd8d8a9b6b36082819bd6c38e1bb21c7 (patch)
tree4e5b689d5677b06ea580219d8a4d1b84ebcb3c2e /toke.c
parentbb61cbbfe4f34b8082fca34dd9dd82cae6aaa146 (diff)
downloadperl-85613cabfd8d8a9b6b36082819bd6c38e1bb21c7.tar.gz
Fix for [perl #70910] wrong line number in syntax error message
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index d498a34b60..2ec5f2d95a 100644
--- a/toke.c
+++ b/toke.c
@@ -4363,7 +4363,8 @@ Perl_yylex(pTHX)
PL_doextract = FALSE;
}
}
- incline(s);
+ if (PL_rsfp)
+ incline(s);
} while (PL_doextract);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = s;
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);