From 0356f2857676aea0c2148f84ab6854cc3482d686 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Nov 2024 07:26:32 +0530 Subject: [PATCH] Fix #8031 --- kitty/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index 8e01705b2..164a49e28 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -467,8 +467,8 @@ face_has_codepoint(const void* face, char_type cp) { static bool has_emoji_presentation(const GPUCell *gpu_cell, const ListOfChars *lc) { - if (gpu_cell->attrs.width != 2) return false; - return lc->count > 1 && is_emoji(lc->chars[0]) && lc->chars[1] != VS15; + if (gpu_cell->attrs.width != 2 || !lc->count) return false; + return is_emoji(lc->chars[0]) && (lc->count == 1 || lc->chars[1] != VS15); } bool