From 7139d3b286bba5874548eb6faca25cf9bb90f7be Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 20 Mar 2024 23:40:23 +0100 Subject: 52783: allow for unset hash element --- Src/Modules/hlgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') 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; -- cgit v1.2.3-70-g09d2