1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 06:20:55 +01:00

36766: fix incorrect reset of noerrexit during "if" conditions

This commit is contained in:
Barton E. Schaefer 2015-10-03 19:40:14 -07:00
parent faeb9555d3
commit b581c3fece
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-10-03 Barton E. Schaefer <schaefer@zsh.org>
* 36766: Src/exec.c: fix incorrect reset of noerrexit during
"if" conditions
2015-10-03 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 36760: Src/pattern.c: ensure we don't do anything untoward

View file

@ -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) {
/*