diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/builtin.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index c5d7e62ff..9cdb70ba7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2019-05-14 Oliver Kiddle <okiddle@yahoo.co.uk> + * 44284: Src/builtin.c: combination of -T and -p to typeset + crashed the shell. + * 44290: Src/jobs.c: job number exceeding int range and wrapping to a negative number crashed the shell. 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; |