From 97fd0d9b8907827d786b92f6cc66618d57ac7518 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 3 Sep 2004 09:47:44 +0000 Subject: 20308: add EVAL_LINENO option --- Src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index d1c3bb98e..5fd2a2e30 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -788,7 +788,7 @@ execsimple(Estate state) return (lastval = 1); /* In evaluated traps, don't modify the line number. */ - if ((!intrap || trapisfunc) && code) + if ((!intrap || trapisfunc) && !ineval && code) lineno = code - 1; code = wc_code(*state->pc++); @@ -1260,7 +1260,7 @@ execpline2(Estate state, wordcode pcode, return; /* In evaluated traps, don't modify the line number. */ - if ((!intrap || trapisfunc) && WC_PIPE_LINENO(pcode)) + if ((!intrap || trapisfunc) && !ineval && WC_PIPE_LINENO(pcode)) lineno = WC_PIPE_LINENO(pcode) - 1; if (pline_level == 1) { -- cgit 1.4.1