about summary refs log tree commit diff
path: root/Src/loop.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-06-21 16:12:51 +0100
committerPeter Stephenson <pws@zsh.org>2016-06-21 16:12:51 +0100
commit016929e043abb8ba778293c29081ca8e227c6e58 (patch)
treee79d08294aaf4cdb0a2090d729a5503e4f2ccb4c /Src/loop.c
parentd309d9addc114d22175f5feb0ab2e5fdf290dc02 (diff)
downloadzsh-016929e043abb8ba778293c29081ca8e227c6e58.tar.gz
zsh-016929e043abb8ba778293c29081ca8e227c6e58.tar.xz
zsh-016929e043abb8ba778293c29081ca8e227c6e58.zip
38734: fix final case clauses terminating with ;&
Diffstat (limited to 'Src/loop.c')
-rw-r--r--Src/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/loop.c b/Src/loop.c
index 19d7f733e..fa7602e37 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -660,7 +660,7 @@ execcase(Estate state, int do_exec)
 	    execlist(state, 1, ((WC_CASE_TYPE(code) == WC_CASE_OR) &&
 				do_exec));
 	    while (!retflag && wc_code(code) == WC_CASE &&
-		   WC_CASE_TYPE(code) == WC_CASE_AND) {
+		   WC_CASE_TYPE(code) == WC_CASE_AND && state->pc < end) {
 		state->pc = next;
 		code = *state->pc++;
 		next = state->pc + WC_CASE_SKIP(code);