diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 5880e32af..99e54f6e0 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -132,14 +132,15 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map, hb_buffer_t *buffer, hb unsigned int count = buffer->len; for (buffer->idx = 0; buffer->idx < count;) { - if (likely (!IS_SARA_AM (buffer->info[buffer->idx].codepoint))) { + hb_codepoint_t u = buffer->info[buffer->idx].codepoint; + if (likely (!IS_SARA_AM (u))) { buffer->next_glyph (); continue; } /* Is SARA AM. Decompose and reorder. */ - uint16_t decomposed[2] = {NIKHAHIT_FROM_SARA_AM (buffer->info[buffer->idx].codepoint), - SARA_AA_FROM_SARA_AM (buffer->info[buffer->idx].codepoint)}; + uint16_t decomposed[2] = {uint16_t (NIKHAHIT_FROM_SARA_AM (u)), + uint16_t (SARA_AA_FROM_SARA_AM (u))}; buffer->replace_glyphs (1, 2, decomposed); if (unlikely (buffer->in_error)) return;