summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2022-09-07 15:18:21 +0900
committerEli Zaretskii <eliz@gnu.org>2022-09-17 19:58:52 +0300
commit7fe22182d3abcb3124c50f717cc74925800b7720 (patch)
tree437d9a10fff40153feee6dc3cf3447f3a933d67f /src/composite.c
parentcbac94b4aeecdf57e2a1f3e95e27ec76505ae964 (diff)
downloademacs-7fe22182d3abcb3124c50f717cc74925800b7720.tar.gz
Fix rare shaping problems with Urdu and Arabic
* src/composite.c (fill_gstring_body): Clear unused slots of the gstring. (Bug#50951)
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/composite.c b/src/composite.c
index 22422cca090..249d7587f61 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -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);
}