Mercurial > repos > blastem
diff nuklear_ui/sfnt.c @ 1559:098c11aaf8f0
Fix silly bug in handling of Mac Roman font names. Make Mac font search more exhaustive if the faster prefix check fails. Added a bunch of debug printfs in case those aren't sufficient to get things working on other machines
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 04 Apr 2018 00:01:17 -0700 |
parents | 4f6e8acd7b6a |
children | 369a52e302e2 |
line wrap: on
line diff
--- a/nuklear_ui/sfnt.c Mon Apr 02 00:58:42 2018 -0700 +++ b/nuklear_ui/sfnt.c Wed Apr 04 00:01:17 2018 -0700 @@ -200,9 +200,9 @@ } if (entry == macroman_entry) { //TODO: convert these properly to UTF-8 - char *ret = malloc(name_size + 1); + char *ret = malloc(name_length + 1); memcpy(ret, name_table + full_off, name_length); - ret[name_size] = 0; + ret[name_length] = 0; return ret; } else { return utf16be_to_utf8(name_table + full_off, name_length/2);