1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +01:00

52783: allow for unset hash element

This commit is contained in:
Oliver Kiddle 2024-03-20 23:40:23 +01:00
parent cd5ae4a909
commit 7139d3b286
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,7 @@
2024-03-20 Oliver Kiddle <opk@zsh.org>
* 52783: Src/Modules/hlgroup.c: allow for unset hash element
* unposted: configure.ac: remove reference to fp_PROG_CC_STDC
macro which was removed in 52750

View file

@ -91,7 +91,8 @@ getgroup(const char *name, int sgr)
if (!(v = getvalue(&vbuf, &var, 0)) ||
PM_TYPE(v->pm->node.flags) != PM_HASHED ||
!(hlg = v->pm->gsu.h->getfn(v->pm)) ||
!(hn = gethashnode2(hlg, name)))
!(hn = gethashnode2(hlg, name)) ||
(((Param) hn)->node.flags & PM_UNSET))
{
pm->u.str = dupstring("");
pm->node.flags |= PM_UNSET;