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/exec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index d821d164f..8249deff2 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4243,8 +4243,10 @@ execfuncdef(Estate state, UNUSED(int do_exec)) if (htok && names) { execsubst(names); - if (errflag) + if (errflag) { + state->pc = end; return 1; + } } while (!names || (s = (char *) ugetnode(names))) { @@ -4301,8 +4303,13 @@ execfuncdef(Estate state, UNUSED(int do_exec)) end += *state->pc++; args = ecgetlist(state, *state->pc++, EC_DUPTOK, &htok); - if (htok && args) + if (htok && args) { execsubst(args); + if (errflag) { + state->pc = end; + return 1; + } + } if (!args) args = newlinklist(); -- cgit v1.2.3