[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Nov 30 16:32:12 UTC 2018


 src/hb-face.cc |    4 ++--
 src/hb-set.hh  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0f32c95e1487ffcc37439635c3294f941eae857a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Nov 30 11:31:39 2018 -0500

    Fix a few more sizeof(vector[0]) errors with weird compilers

diff --git a/src/hb-face.cc b/src/hb-face.cc
index 5b33784f..724f54d5 100644
--- a/src/hb-face.cc
+++ b/src/hb-face.cc
@@ -647,8 +647,8 @@ _hb_face_builder_data_reference_blob (hb_face_builder_data_t *data)
   bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2'));
   hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag;
 
-  Supplier<hb_tag_t>    tags_supplier  (&data->tables[0].tag, table_count, sizeof (data->tables[0]));
-  Supplier<hb_blob_t *> blobs_supplier (&data->tables[0].blob, table_count, sizeof (data->tables[0]));
+  Supplier<hb_tag_t>    tags_supplier  (&data->tables[0].tag, table_count, data->tables.item_size);
+  Supplier<hb_blob_t *> blobs_supplier (&data->tables[0].blob, table_count, data->tables.item_size);
   bool ret = f->serialize_single (&c,
 				  sfnt_tag,
 				  tags_supplier,
diff --git a/src/hb-set.hh b/src/hb-set.hh
index a3beeef1..f1fccd8f 100644
--- a/src/hb-set.hh
+++ b/src/hb-set.hh
@@ -678,7 +678,7 @@ struct hb_set_t
       pages[map.index].init0 ();
       memmove (page_map + i + 1,
 	       page_map + i,
-	       (page_map.len - 1 - i) * sizeof (page_map[0]));
+	       (page_map.len - 1 - i) * page_map.item_size);
       page_map[i] = map;
     }
     return &pages[page_map[i].index];


More information about the HarfBuzz mailing list