diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index ed8e8d30a..c11d0e465 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -2072,7 +2072,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const { GSUBProxy proxy (font->face); - char tag[5]; + char tag[5] = {0}; hb_tag_to_string (chosen_script[0], tag); if (buffer->messaging () && !buffer->message (font, "start table GSUB script tag '%s'", tag)) return; @@ -2084,13 +2084,13 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const { GPOSProxy proxy (font->face); - char tag[5]; + char tag[5] = {0}; hb_tag_to_string (chosen_script[0], tag); if (buffer->messaging () && - !buffer->message (font, "start table GPOS script tag '%c%c%c%c'", tag)) return; + !buffer->message (font, "start table GPOS script tag '%s'", tag)) return; apply (proxy, plan, font, buffer); if (buffer->messaging ()) - (void) buffer->message (font, "end table GPOS script tag '%c%c%c%c'", tag); + (void) buffer->message (font, "end table GPOS script tag '%s'", tag); } void