From 2f6a8a6c6c3774ac6f9317288adf03e2a065cb42 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 22 May 2015 23:37:20 +0100 Subject: Tweak test for function level of exit. Sometimes local level jumps so we need an inequality instead of an equality. --- Src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src') 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; -- cgit 1.4.1