aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-15 18:12:57 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-15 18:12:57 -0500
commita1884f7a85cbee5a67cf48c9e7b088fdea8b8b38 (patch)
tree71cef5252729945cf5d56a84e17067a0514dedb9 /src/stdlib
parent38ea5c4753e13b04e7c41c89bf0b58b5d47cc86d (diff)
Fix for potential issue with codepoint names
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/text.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdlib/text.c b/src/stdlib/text.c
index f323d88d..8e800c8a 100644
--- a/src/stdlib/text.c
+++ b/src/stdlib/text.c
@@ -1605,6 +1605,7 @@ static INLINE const char *codepoint_name(ucs4_t c) {
char *found_name = unicode_character_name(c, name);
if (found_name) return found_name;
const uc_block_t *block = uc_block(c);
+ if (!block) return "???";
assert(block);
return String(block->name, "-", hex(c, .no_prefix = true, .uppercase = true));
}