[sanitize] Add short-circuit to ArrayOfM1

Like the sibling ArrayOf types.
This commit is contained in:
Behdad Esfahbod 2021-03-29 17:31:09 -06:00
parent 5b6da6d2f0
commit bcb57dccaa
1 changed files with 1 additions and 0 deletions

View File

@ -861,6 +861,7 @@ struct ArrayOfM1
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = lenM1 + 1;
for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))