Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix crash in %H when hlgroups is empty
- X-seq: zsh-workers 52516
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: fix crash in %H when hlgroups is empty
- Date: Sun, 4 Feb 2024 16:28:38 +0100
- Archived-at: <https://zsh.org/workers/52516>
- List-id: <zsh-workers.zsh.org>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author