From 582a87ef0a320061b991662f081e6b247f7f38f2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 30 Nov 2022 11:20:19 -0700 Subject: [PATCH] [cff] Speed up FDSelect0 sanitize --- src/hb-ot-cff-common.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 21ee2584f..c825b0347 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -420,9 +420,8 @@ struct FDSelect0 { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this)))) return_trace (false); - for (unsigned int i = 0; i < c->get_num_glyphs (); i++) - if (unlikely (!fds[i].sanitize (c))) - return_trace (false); + if (unlikely (!c->check_array (fds, c->get_num_glyphs ()))) + return_trace (false); return_trace (true); }