* PATCH: fix crash in %H when hlgroups is empty
@ 2024-02-04 15:28 Mikael Magnusson
0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2024-02-04 15:28 UTC (permalink / raw)
To: zsh-workers
typeset -A .zle.hlgroups; print -P %H
---
Src/prompt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/prompt.c b/Src/prompt.c
index ec79067cd9..b1e5041bd2 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -257,7 +257,7 @@ parsehighlight(char *arg, char endchar, zattr *atr)
{
Param node;
HashTable ht = v->pm->gsu.h->getfn(v->pm);
- if ((node = (Param) ht->getnode(ht, arg))) {
+ if (ht && (node = (Param) ht->getnode(ht, arg))) {
attrs = node->gsu.s->getfn(node);
entered = 1;
if (match_highlight(attrs, atr, 0) == attrs)
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-04 15:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 15:28 PATCH: fix crash in %H when hlgroups is empty Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).