From 848badaa5f0a18ca3388016d49ffc340b6c2d0c6 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 20 Apr 2014 10:27:15 -0700 Subject: 32568: consistency in handling of errflag condition during substitutions Affects for/select word lists, function definition name position, and anonymous function argument lists. --- Src/loop.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Src/loop.c') diff --git a/Src/loop.c b/Src/loop.c index 90a0761b3..dc8f2320f 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -87,8 +87,13 @@ execfor(Estate state, int do_exec) state->pc = end; return 0; } - if (htok) + if (htok) { execsubst(args); + if (errflag) { + state->pc = end; + return 1; + } + } } else { char **x; @@ -223,8 +228,13 @@ execselect(Estate state, UNUSED(int do_exec)) state->pc = end; return 0; } - if (htok) + if (htok) { execsubst(args); + if (errflag) { + state->pc = end; + return 1; + } + } } if (!args || empty(args)) { state->pc = end; -- cgit 1.4.1