diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 5ea6677fe..d050b2ff7 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -798,12 +798,12 @@ struct CmapSubtableFormat12 : CmapSubtableLongSegmented unsigned table_initpos = c->length (); if (unlikely (!c->extend_min (this))) return; - hb_codepoint_t startCharCode = 0xFFFF, endCharCode = 0xFFFF; + hb_codepoint_t startCharCode = (hb_codepoint_t) -1, endCharCode = (hb_codepoint_t) -1; hb_codepoint_t glyphID = 0; for (const auto& _ : +it) { - if (startCharCode == 0xFFFF) + if (startCharCode == (hb_codepoint_t) -1) { startCharCode = _.first; endCharCode = _.first;