about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2004-09-04 16:59:35 +0000
committerBart Schaefer <barts@users.sourceforge.net>2004-09-04 16:59:35 +0000
commit91a08a2517309648863773962603f37d789fbde9 (patch)
tree434fdecf3ec760802dbb8827322e4a96f7625af1 /Src
parent97fd0d9b8907827d786b92f6cc66618d57ac7518 (diff)
downloadzsh-91a08a2517309648863773962603f37d789fbde9.tar.gz
zsh-91a08a2517309648863773962603f37d789fbde9.tar.xz
zsh-91a08a2517309648863773962603f37d789fbde9.zip
20318: Fix xtrace output bug introduced by 20308.
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c9
1 files changed, 5 insertions, 4 deletions
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;