summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-09-17 10:42:17 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-09-17 10:42:17 +0000
commit41b50445eab2eb71c4446f85e368a273b52c39a3 (patch)
treec36d8bf5da8c8c3727fc411c11e9aae66790d846 /Src/exec.c
parent49bfbc12483602937380658d67acd6c009d39159 (diff)
downloadzsh-41b50445eab2eb71c4446f85e368a273b52c39a3.tar.gz
zsh-41b50445eab2eb71c4446f85e368a273b52c39a3.zip
17673: Fix bug with &&s and ||s in complex constructs
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 9033e146d..ca7b2061f 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -851,8 +851,15 @@ execlist(Estate state, int dont_change_job, int exiting)
* for this sublist. */
donetrap = 1;
goto sublist_done;
- } else if (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END)
+ } else if (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END) {
donetrap = 1;
+ /*
+ * Treat this in the same way as if we reached
+ * the end of the sublist normally.
+ */
+ state->pc = next;
+ goto sublist_done;
+ }
}
cmdpush(CS_CMDAND);
break;
@@ -877,8 +884,15 @@ execlist(Estate state, int dont_change_job, int exiting)
* for this sublist. */
donetrap = 1;
goto sublist_done;
- } else if (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END)
+ } else if (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END) {
donetrap = 1;
+ /*
+ * Treat this in the same way as if we reached
+ * the end of the sublist normally.
+ */
+ state->pc = next;
+ goto sublist_done;
+ }
}
cmdpush(CS_CMDOR);
break;