summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2019-05-14 23:36:59 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2019-05-14 23:36:59 +0200
commitfae7c853319798e170a0bcf1b3098b1a07447c70 (patch)
tree530d52db5b7801ad238c474512ab7de19054d3bb /Src/builtin.c
parentb5519b372beaa5b954e5db5a6098bce24ff088f9 (diff)
downloadzsh-fae7c853319798e170a0bcf1b3098b1a07447c70.tar.gz
zsh-fae7c853319798e170a0bcf1b3098b1a07447c70.zip
44284: combination of -T and -p to typeset crashed the shell.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c6
1 files changed, 2 insertions, 4 deletions
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;