From 150c53ee969876c2831b6165cb71655e7ce2dbdb Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Wed, 14 Mar 2018 16:08:12 +0100
Subject: [PATCH] [color/COLR] Fix bad sanitize

Bad bad bad bad code. Don't do that. If compiler's not happy, understand why.
---
 src/hb-ot-color-colr-table.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh
index 01d703778..9f8b9375e 100644
--- a/src/hb-ot-color-colr-table.hh
+++ b/src/hb-ot-color-colr-table.hh
@@ -80,8 +80,8 @@ struct COLR
   {
     TRACE_SANITIZE (this);
     if (!(c->check_struct (this) &&
-        c->check_array ((const void*) &layerRecordsOffsetZ, sizeof (LayerRecord), numLayerRecords) &&
-        c->check_array ((const void*) &baseGlyphRecordsZ, sizeof (BaseGlyphRecord), numBaseGlyphRecords)))
+        c->check_array (&(this+layerRecordsOffsetZ), sizeof (LayerRecord), numLayerRecords) &&
+        c->check_array (&(this+baseGlyphRecordsZ), sizeof (BaseGlyphRecord), numBaseGlyphRecords)))
       return_trace (false);
 
     const BaseGlyphRecord* base_glyph_records = &baseGlyphRecordsZ (this);