about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-04-04 09:35:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-04-04 09:35:36 +0000
commit82c9c7a42351c5b674153149c761eaa0103cd89e (patch)
tree963270079d9a7f7ecea5a58f6efebdf2cc0b921a /Src/exec.c
parentaac33a33a143aefacbea64a803a84327fbc84bde (diff)
downloadzsh-82c9c7a42351c5b674153149c761eaa0103cd89e.tar.gz
zsh-82c9c7a42351c5b674153149c761eaa0103cd89e.tar.xz
zsh-82c9c7a42351c5b674153149c761eaa0103cd89e.zip
21082: Dan Nelson: fix zsh -c exit status on parse error
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 1e5a2d0fd..d19c55ad4 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -162,6 +162,8 @@ parse_string(char *s)
     lineno = 1;
     p = parse_list();
     lineno = oldlineno;
+    if (tok == LEXERR && !lastval)
+	lastval = 1;
     strinend();
     inpop();
     lexrestore();