1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-05-20 23:41:27 +02:00

52516: fix crash in %H when hlgroups is empty

typeset -A .zle.hlgroups; print -P %H
This commit is contained in:
Mikael Magnusson 2024-02-04 16:25:14 +01:00
parent c8f0946ddc
commit ec446a6f34
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2024-02-04 Mikael Magnusson <mikachu@gmail.com>
* 52516: Src/prompt.c: fix crash in %H when hlgroups is empty
2024-02-03 Bart Schaefer <schaefer@zsh.org>
* unposted: Util/printdefines: updates and fix omissions

View file

@ -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)