about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 527dffba8..527d61197 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -5109,7 +5109,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
      * when we have an "always" block.  The endparamscope() has
      * already happened, hence the "+1" here.
      */
-    if (exit_pending && exit_level == locallevel+1) {
+    if (exit_pending && exit_level >= locallevel+1) {
 	if (locallevel > forklevel) {
 	    /* Still functions to return: force them to do so. */
 	    retflag = 1;