summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index daccf3d..7b341f3 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -387,8 +387,9 @@ evalloop(union node *n, int flags)
 		status = exitstatus;
 		skip = skiploop();
 	} while (!(skip & ~SKIPCONT));
+	if (skip != SKIPFUNC)
+		exitstatus = status;
 	loopnest--;
-	exitstatus = status;
 }