[hvgl] Add table version check

This commit is contained in:
Behdad Esfahbod committed 2025-03-02 16:57:55 -07:00
1 parent d4b29817c8
commit 9579cee8b0
1 file changed
+4
+4
View File
@@ -596,6 +596,10 @@ struct hvgl
if (unlikely (!c->check_struct (this))) return_trace (false);
hb_barrier ();
if (unlikely (versionMajor != 3 ||
(versionMajor == 3 && versionMinor < 1))) return_trace (false);
const auto &parts = StructAtOffset<hvgl_impl::PartsIndex> (this, partsOff);
if (unlikely (!parts.sanitize (c, (unsigned) partCount))) return_trace (false);