summary refs log tree commit diff
path: root/Src/loop.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-10-01 09:44:56 +0100
committerPeter Stephenson <pws@zsh.org>2015-10-01 09:44:56 +0100
commit8877783b2f98de67144f403e0146b6d201e98ba3 (patch)
treec8fe6c4d4fc6d7c93119c01cc300427655001ba3 /Src/loop.c
parent007f249a8e190306a9ef6bca2317e79004ace871 (diff)
parentbc2e73ba4c27a220a6f122cb7b9b5c6fa9996941 (diff)
downloadzsh-8877783b2f98de67144f403e0146b6d201e98ba3.tar.gz
zsh-8877783b2f98de67144f403e0146b6d201e98ba3.tar.xz
zsh-8877783b2f98de67144f403e0146b6d201e98ba3.zip
Merge branch 'master' of https://git.code.sf.net/p/zsh/code
Diffstat (limited to 'Src/loop.c')
-rw-r--r--Src/loop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/loop.c b/Src/loop.c
index 4def9b652..7d1528efe 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -552,8 +552,12 @@ execif(Estate state, int do_exec)
 	    run = 1;
 	    break;
 	}
-	if (retflag)
-	    break;
+	if (retflag) {
+	    if (retflag == 2)
+		retflag = 0; /* Never ERR_RETURN here */
+	    else
+		break;
+	}
 	s = 1;
 	state->pc = next;
     }