mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 12:31:47 +00:00
Fixed crash in djui_unicode_get_base_char()
This commit is contained in:
parent
522d7c0373
commit
d0e6b7a1f6
1 changed files with 1 additions and 0 deletions
|
|
@ -365,6 +365,7 @@ void djui_unicode_cleanup_end(char* text) {
|
|||
char djui_unicode_get_base_char(char* text) {
|
||||
if ((u8)*text < ' ') { return '?'; }
|
||||
if ((u8)*text < 128) { return *text; }
|
||||
if (!sCharMap) { return '?'; }
|
||||
u64 key = convert_unicode_char_to_u64(text);
|
||||
struct SmCodeGlyph* glyph = hmap_get(sCharMap, key);
|
||||
return (glyph != NULL || ((u8)glyph->base < (u8)'!')) ? glyph->base : '?';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue