From 9bfe22af6113ee8cd24cb9ee091f0841c27bbf98 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 22:44:19 -0700 Subject: [PATCH] [sanitize] Fix previous commit --- src/hb-open-type.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 13b1245..57b22a8 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -445,7 +445,7 @@ struct UnsizedArrayOf { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c, count))) return_trace (false); - if (hb_is_trivially_copyable (Type)) return_trace (true); + if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true); for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], hb_forward (ds)...))) return_trace (false); @@ -605,7 +605,7 @@ struct ArrayOf { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); - if (hb_is_trivially_copyable (Type)) return_trace (true); + if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true); unsigned int count = len; for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], hb_forward (ds)...))) @@ -723,7 +723,7 @@ struct HeadlessArrayOf { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); - if (hb_is_trivially_copyable (Type)) return_trace (true); + if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true); unsigned int count = lenP1 ? lenP1 - 1 : 0; for (unsigned int i = 0; i < count; i++) if (unlikely (!c->dispatch (arrayZ[i], hb_forward (ds)...))) @@ -954,7 +954,7 @@ struct VarSizedBinSearchArrayOf { TRACE_SANITIZE (this); if (unlikely (!sanitize_shallow (c))) return_trace (false); - if (hb_is_trivially_copyable (Type)) return_trace (true); + if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true); unsigned int count = get_length (); for (unsigned int i = 0; i < count; i++) if (unlikely (!(*this)[i].sanitize (c, hb_forward (ds)...))) -- 2.7.4