From a124da3a4a4bf6e91a567033e1e03241d9d0faa9 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 9 Dec 2007 23:53:33 +0000 Subject: 24150: Exit status of null command should be exit status of last cmdsubst. --- Src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/exec.c') 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) -- cgit v1.2.3