diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 4f24d7372..a903e1cdd 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -154,7 +154,7 @@ struct name enum { tableTag = HB_OT_TAG_name }; inline unsigned int get_size (void) const - { return min_size + count * nameRecordZ[0].min_size; } + { return min_size + count * nameRecordZ.item_size; } inline bool sanitize_records (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); @@ -189,7 +189,7 @@ struct name this->names.init (); this->names.alloc (all_names.len); - for (uint16_t i = 0; i < all_names.len; i++) + for (unsigned int i = 0; i < all_names.len; i++) { hb_ot_name_entry_t *entry = this->names.push ();