From d1ff06f99185bb14554c6a48e0466aee6466ecac Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 2 Mar 2024 21:37:25 -0800 Subject: 52652: fix obscure bug unsetting the array part of a tied parameter pair --- Src/params.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/params.c b/Src/params.c index 064dbd2bc..e83e4aa5e 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3813,12 +3813,15 @@ unsetparam_pm(Param pm, int altflag, int exp) /* fudge things so removenode isn't called */ altpm->level = 1; } - unsetparam_pm(altpm, 1, exp); + unsetparam_pm(altpm, 1, exp); /* This resets pm to empty */ + pm->node.flags |= PM_UNSET; /* so we must repeat this */ } zsfree(altremove); - if (!(pm->node.flags & PM_SPECIAL)) + if (!(pm->node.flags & PM_SPECIAL)) { pm->gsu.s = &stdscalar_gsu; + pm->node.flags &= ~PM_ARRAY; + } } /* -- cgit 1.4.1