[subset] fix failure to init instruction ranges values for an invalid glyph.

This commit is contained in:
Garret Rieger 2019-01-18 16:41:08 -08:00
parent 4b1ac3a2fa
commit 96b038f375

View File

@ -132,7 +132,7 @@ _calculate_glyf_and_loca_prime_size (const OT::glyf::accelerator_t &glyf,
glyf.remove_padding (start_offset, &end_offset))))
{
DEBUG_MSG(SUBSET, nullptr, "Invalid gid %d", next_glyph);
continue;
start_offset = end_offset = 0;
}
bool is_zero_length = end_offset - start_offset < OT::glyf::GlyphHeader::static_size;