[subset] fix failure to init instruction ranges values for an invalid glyph.
diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc
index 7b4344b..51608c9 100644
--- a/src/hb-subset-glyf.cc
+++ b/src/hb-subset-glyf.cc
@@ -132,7 +132,7 @@
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;
@@ -242,9 +242,9 @@
if (glyf_prime_data_next + length > glyf_prime_data + glyf_prime_size)
{
DEBUG_MSG(SUBSET,
- nullptr,
- "WARNING: Attempted to write an out of bounds glyph entry for gid %d (length %d)",
- i, length);
+ nullptr,
+ "WARNING: Attempted to write an out of bounds glyph entry for gid %d (length %d)",
+ i, length);
return false;
}