about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2004-09-08 08:24:00 +0000
committerBart Schaefer <barts@users.sourceforge.net>2004-09-08 08:24:00 +0000
commit72fdf24448680e1e23cff86e302534b58bc2a442 (patch)
tree912b2702fa6624362c0d5f7b04785afb57e97acc /Src
parent91a08a2517309648863773962603f37d789fbde9 (diff)
downloadzsh-72fdf24448680e1e23cff86e302534b58bc2a442.tar.gz
zsh-72fdf24448680e1e23cff86e302534b58bc2a442.tar.xz
zsh-72fdf24448680e1e23cff86e302534b58bc2a442.zip
20320: rewrite of 20318, for sanity.
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index a9d9b413e..0a2d55587 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4239,22 +4239,19 @@ bin_eval(UNUSED(char *nam), char **argv, UNUSED(Options ops), UNUSED(int func))
 	scriptname = "(eval)";
 
     prog = parse_string(zjoin(argv, ' ', 1));
-    if (!prog) {
-	errflag = 0;
-        scriptname = oscriptname;
-        ineval = oineval;
-	return 1;
-    }
+    if (prog) {
+	lastval = 0;
 
-    lastval = 0;
+	execode(prog, 1, 0);
 
-    execode(prog, 1, 0);
-
-    if (errflag) {
-	lastval = errflag;
-	errflag = 0;
+	if (errflag)
+	    lastval = errflag;
+    } else {
+	lastval = 1;
     }
 
+
+    errflag = 0;
     scriptname = oscriptname;
     ineval = oineval;