From 601be75605b4e3f78393950d089e6c8e5d555567 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 19 Jun 2015 14:26:08 +0100 Subject: Expand name part of typeset assignment where needed --- Src/exec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 74059bfdc..ef3e85948 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3493,8 +3493,13 @@ execcmd(Estate state, int input, int output, int how, int last1) DPUTS(wc_code(ac) != WC_ASSIGN, "BUG: bad assignment list for typeset"); - if (htok) - untokenize(name); + if (htok) { + init_list1(svl, name); + prefork(&svl, PREFORK_SINGLE); + name= empty(&svl) ? "" : + (char *)getdata(firstnode(&svl)); + } + untokenize(name); asg->name = name; if (WC_ASSIGN_TYPE(ac) == WC_ASSIGN_SCALAR) { char *val = ecgetstr(state, EC_DUPTOK, &htok); -- cgit 1.4.1