diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-04-04 00:01:17 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-04-04 00:01:17 -0700 |
commit | b3aa7c607b5e4e369bbb908b9130523d4a47fcb4 (patch) | |
tree | d93f84bfd370b7fb8db9ed7cfa978a02caff8568 /nuklear_ui/sfnt.c | |
parent | 780febbc0e17960dbea563a9a1b610829ec2ae0b (diff) |
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
Diffstat (limited to 'nuklear_ui/sfnt.c')
-rw-r--r-- | nuklear_ui/sfnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuklear_ui/sfnt.c b/nuklear_ui/sfnt.c index 7c69a90..1636af5 100644 --- a/nuklear_ui/sfnt.c +++ b/nuklear_ui/sfnt.c @@ -200,9 +200,9 @@ char *sfnt_name(sfnt_table *sfnt, uint16_t name_type) } 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); |