From c03228f9ed28dfaa9ded49eabb93c04def5ac547 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 5 Dec 2016 11:21:01 +0000 Subject: Extra case for ERR_RETURN and ERR_EXIT. Don't trigger just because status is non-zero at end of complex shell construct as this may be a case we've already suppressed. --- Src/loop.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Src/loop.c') diff --git a/Src/loop.c b/Src/loop.c index 367c0df5c..ae87b2f5f 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -208,6 +208,7 @@ execfor(Estate state, int do_exec) loops--; simple_pline = old_simple_pline; state->pc = end; + this_noerrexit = 1; return lastval; } @@ -335,6 +336,7 @@ execselect(Estate state, UNUSED(int do_exec)) loops--; simple_pline = old_simple_pline; state->pc = end; + this_noerrexit = 1; return lastval; } @@ -472,6 +474,7 @@ execwhile(Estate state, UNUSED(int do_exec)) popheap(); loops--; state->pc = end; + this_noerrexit = 1; return lastval; } @@ -523,6 +526,7 @@ execrepeat(Estate state, UNUSED(int do_exec)) loops--; simple_pline = old_simple_pline; state->pc = end; + this_noerrexit = 1; return lastval; } @@ -573,6 +577,7 @@ execif(Estate state, int do_exec) lastval = 0; } state->pc = end; + this_noerrexit = 1; return lastval; } @@ -682,6 +687,7 @@ execcase(Estate state, int do_exec) if (!anypatok) lastval = 0; + this_noerrexit = 1; return lastval; } -- cgit 1.4.1