From b581c3fece76c87ed86ae9fc704d0fcf208a79d3 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sat, 3 Oct 2015 19:40:14 -0700 Subject: 36766: fix incorrect reset of noerrexit during "if" conditions --- Src/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 154bbb8db..235faf3ba 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1364,7 +1364,8 @@ sublist_done: * we hit execcmd on the way down. We're now * on the way back up, so don't restore it. */ - noerrexit = (oldnoerrexit == 2) ? 0 : oldnoerrexit; + if (oldnoerrexit != 2) + noerrexit = oldnoerrexit; if (sigtrapped[SIGDEBUG] && !isset(DEBUGBEFORECMD) && !donedebug) { /* -- cgit 1.4.1