[sanitize] Fix previous commit
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 05:44:19 +0000 (22:44 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 05:44:19 +0000 (22:44 -0700)
src/hb-open-type.hh

index 13b1245..57b22a8 100644 (file)
@@ -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<Ts> (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<Ts> (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<Ts> (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<Ts> (ds)...)))