[name] Skip enumerating names with unknown language

This commit is contained in:
Behdad Esfahbod 2018-10-24 12:40:15 -07:00
parent 2c39f359e4
commit 622b014faf
1 changed files with 2 additions and 1 deletions

View File

@ -206,7 +206,8 @@ struct name
unsigned int j = 0;
for (unsigned int i = 0; i < this->names.len; i++)
{
if (this->names[i].entry_score == UNSUPPORTED)
if (this->names[i].entry_score == UNSUPPORTED ||
this->names[i].language == HB_LANGUAGE_INVALID)
continue;
if (i &&
this->names[i - 1].name_id == this->names[i].name_id &&