about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2024-03-20 23:40:23 +0100
committerOliver Kiddle <opk@zsh.org>2024-03-20 23:40:23 +0100
commit7139d3b286bba5874548eb6faca25cf9bb90f7be (patch)
tree9a780eb6a8054d7e6419113b1f88ea2be61e3933 /Src
parentcd5ae4a909ea7b09b860c3be29d46a0f616c147d (diff)
downloadzsh-7139d3b286bba5874548eb6faca25cf9bb90f7be.tar.gz
zsh-7139d3b286bba5874548eb6faca25cf9bb90f7be.tar.xz
zsh-7139d3b286bba5874548eb6faca25cf9bb90f7be.zip
52783: allow for unset hash element
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/hlgroup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Modules/hlgroup.c b/Src/Modules/hlgroup.c
index 9c0aedcf8..9b656c24e 100644
--- a/Src/Modules/hlgroup.c
+++ b/Src/Modules/hlgroup.c
@@ -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;