From 91a08a2517309648863773962603f37d789fbde9 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 4 Sep 2004 16:59:35 +0000 Subject: [PATCH] 20318: Fix xtrace output bug introduced by 20308. --- ChangeLog | 5 +++++ Src/builtin.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e97d7a2cc..58e9c9a51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-04 Bart Schaefer + + * 20318: Src/builtin.c: fix subtle xtrace output bug introduced + by 20308. + 2004-09-03 Peter Stephenson * 20308: Doc/Zsh/options.yo, Src/builtin.c, Src/exec.c, diff --git a/Src/builtin.c b/Src/builtin.c index 44d85b80a..a9d9b413e 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -4235,16 +4235,18 @@ bin_eval(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func)) * we use a special script name to indicate the special line number. */ ineval = !isset(EVALLINENO); + if (!ineval) + scriptname = "(eval)"; prog = parse_string(zjoin(argv, ' ', 1)); if (!prog) { errflag = 0; + scriptname = oscriptname; + ineval = oineval; return 1; } lastval = 0; - if (!ineval) - scriptname = "(eval)"; execode(prog, 1, 0); @@ -4253,8 +4255,7 @@ bin_eval(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func)) errflag = 0; } - if (!ineval) - scriptname = oscriptname; + scriptname = oscriptname; ineval = oineval; return lastval;