avoid UBSan warning in get_stage_lookups (#450)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1336600
This commit is contained in:
jfkthame 2017-04-03 12:22:39 +01:00 committed by Behdad Esfahbod
parent 8d256841ca
commit 740fdbcd0e
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ struct hb_ot_map_t
assert (stage <= stages[table_index].len);
unsigned int start = stage ? stages[table_index][stage - 1].last_lookup : 0;
unsigned int end = stage < stages[table_index].len ? stages[table_index][stage].last_lookup : lookups[table_index].len;
*plookups = &lookups[table_index][start];
*plookups = end == start ? NULL : &lookups[table_index][start];
*lookup_count = end - start;
}