summaryrefslogtreecommitdiffstats
path: root/Src/exec.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2007-12-09 23:53:33 +0000
committerBart Schaefer <barts@users.sourceforge.net>2007-12-09 23:53:33 +0000
commita124da3a4a4bf6e91a567033e1e03241d9d0faa9 (patch)
treef23fefa2ace89ded670c1ead15cc6195dac3cf71 /Src/exec.c
parent24197: interface to ztrftime() for insufficient memory was broken (diff)
downloadzsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar.gz
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar.bz2
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar.lz
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar.xz
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.tar.zst
zsh-a124da3a4a4bf6e91a567033e1e03241d9d0faa9.zip
24150: Exit status of null command should be exit status of last cmdsubst.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 3c13da476..438e30d0d 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2339,7 +2339,7 @@ execcmd(Estate state, int input, int output, int how, int last1)
lastval = 0;
return;
} else {
- cmdoutval = 0;
+ cmdoutval = lastval;
if (varspc)
addvars(state, varspc, 0);
if (errflag)