From 3fff6d9084e92642f4e13e54e9720c682d5d2bc5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 4 Dec 2022 14:47:38 -0700 Subject: [PATCH] [face-builder] Initialize face orders to -1 --- src/hb-face.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index 89901d202..83c932f32 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -636,7 +636,7 @@ hb_face_collect_variation_unicodes (hb_face_t *face, struct face_table_info_t { hb_blob_t* data; - unsigned order; + signed order; }; struct hb_face_builder_data_t @@ -793,7 +793,7 @@ hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob) hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data; hb_blob_t* previous = data->tables.get (tag).data; - if (!data->tables.set (tag, face_table_info_t {hb_blob_reference (blob), 0})) + if (!data->tables.set (tag, face_table_info_t {hb_blob_reference (blob), -1})) { hb_blob_destroy (blob); return false; @@ -828,7 +828,7 @@ hb_face_builder_sort_tables (hb_face_t *face, for (auto& info : data->tables.values_ref()) info.order = -1; - unsigned order = 0; + signed order = 0; for (const hb_tag_t* tag = tags; *tag; tag++)