summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toke.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 7bb61c9597..5a43c097b5 100644
--- a/toke.c
+++ b/toke.c
@@ -1485,8 +1485,9 @@ yylex()
if (*d++ == '-') {
while (d = moreswitches(d)) ;
if (perldb && !oldpdb ||
- minus_n && !oldn ||
- minus_p && !oldp)
+ ( minus_n || minus_p ) && !(oldn || oldp) )
+ /* if we have already added "LINE: while (<>) {",
+ we must not do it again */
{
sv_setpv(linestr, "");
oldoldbufptr = oldbufptr = s = SvPVX(linestr);