1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

39844: fix "while" condition as per 39839 (commit 2c56c7e5)

This commit is contained in:
Barton E. Schaefer 2016-11-05 18:23:04 -07:00
parent 2c56c7e5e8
commit ff36590910
2 changed files with 5 additions and 4 deletions

View file

@ -439,13 +439,12 @@ execwhile(Estate state, UNUSED(int do_exec))
if (!((lastval == 0) ^ isuntil)) {
if (breaks)
breaks--;
lastval = oldval;
if (!retflag)
lastval = oldval;
break;
}
if (retflag) {
lastval = oldval;
if (retflag)
break;
}
/* In case the loop body is also a functional no-op,
* make sure signal handlers recognize ^C as above. */