From fae7c853319798e170a0bcf1b3098b1a07447c70 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 14 May 2019 23:36:59 +0200 Subject: 44284: combination of -T and -p to typeset crashed the shell. --- Src/builtin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Src') diff --git a/Src/builtin.c b/Src/builtin.c index 5fbb86635..2453f82c0 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2582,9 +2582,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func), } } pm->node.flags |= (on & PM_READONLY); - - if (OPT_ISSET(ops,'p')) - paramtab->printnode(&pm->node, PRINT_TYPESET); + DPUTS(OPT_ISSET(ops,'p'), "BUG: -p not handled"); return pm; } @@ -2714,7 +2712,7 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func) (!isset(GLOBALEXPORT) && !OPT_ISSET(ops,'g'))) on |= PM_LOCAL; - if (on & PM_TIED) { + if ((on & PM_TIED) && !OPT_ISSET(ops, 'p')) { Param apm; struct asgment asg0, asg2; char *oldval = NULL, *joinstr; -- cgit 1.4.1