Fix rare shaping problems with Urdu and Arabic

* src/composite.c (fill_gstring_body): Clear unused slots of the
gstring.  (Bug#50951)
This commit is contained in:
YAMAMOTO Mitsuharu 2022-09-07 15:18:21 +09:00 committed by Eli Zaretskii
parent cbac94b4ae
commit 7fe22182d3

View file

@ -876,7 +876,8 @@ fill_gstring_body (Lisp_Object gstring)
}
LGLYPH_SET_ADJUSTMENT (g, Qnil);
}
if (i < LGSTRING_GLYPH_LEN (gstring))
len = LGSTRING_GLYPH_LEN (gstring);
for (; i < len; i++)
LGSTRING_SET_GLYPH (gstring, i, Qnil);
}