From c8de0af35935602370cc79193d0e0d53971250d4 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Mon, 19 Sep 2016 00:25:13 -0700 Subject: 39381: handle save/restore of variable values when "typeset"-related reserved words are prefixed by an assignment --- Src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 9a7234e5f..d924148d6 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3543,7 +3543,7 @@ execcmd(Estate state, int input, int output, int how, int last1) * if it's got "command" in front. * If it's a normal command --- save. */ - if (is_shfunc || (hn->flags & BINF_PSPECIAL)) + if (is_shfunc || (hn->flags & (BINF_PSPECIAL|BINF_ASSIGN))) do_save = (orig_cflags & BINF_COMMAND); else do_save = 1; @@ -3552,7 +3552,7 @@ execcmd(Estate state, int input, int output, int how, int last1) * Save if it's got "command" in front or it's * not a magic-equals assignment. */ - if ((cflags & BINF_COMMAND) || !assign) + if ((cflags & (BINF_COMMAND|BINF_ASSIGN)) || !assign) do_save = 1; } if (do_save && varspc) -- cgit 1.4.1