osc: kitty text-size: bail out if text is zero-length

This fixes a crash further down, where we try to lookup an existing
compose sequence.

Closes #2364
This commit is contained in:
Daniel Eklöf 2026-06-12 18:21:51 +02:00
parent 75e201608b
commit 8b047852f3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 0 deletions

3
osc.c
View file

@ -1149,6 +1149,9 @@ kitty_text_size(struct terminal *term, char *string)
*text = '\0';
text++;
if (text[0] == '\0')
return;
char32_t *wchars = ambstoc32(text);
if (wchars == NULL)
return;