Fix check_struct to check min_size instead of sizeof
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index c6c9811..7a79477 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -243,7 +243,7 @@
template <typename Type>
inline bool check_struct (const Type *obj) const
{
- return likely (this->check_range (obj, sizeof (*obj)));
+ return likely (this->check_range (obj, obj->min_size));
}
inline bool can_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED)