# HG changeset patch # User Kenichi Handa # Date 1280118605 -32400 # Node ID 0526a9cf04a33de50c7c23e1b69729a32a09c396 # Parent 6b02202d9fdc050cefb58c8cdf1124c5c12b0991# Parent 197e874deb67ef51ea09b3e8931da1d4f5c80b53 font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the number of glyphs gets smaller than the original length. diff -r 6b02202d9fdc -r 0526a9cf04a3 src/ChangeLog --- a/src/ChangeLog Mon Jul 26 02:43:58 2010 +0200 +++ b/src/ChangeLog Mon Jul 26 13:30:05 2010 +0900 @@ -1,3 +1,8 @@ +2010-07-26 Kenichi Handa + + * font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the + number of glyphs gets smaller than the original length. + 2010-07-26 Juanma Barranquero * lread.c (unreadpure, mapatoms_1): Make static. diff -r 6b02202d9fdc -r 0526a9cf04a3 src/font.c --- a/src/font.c Mon Jul 26 02:43:58 2010 +0200 +++ b/src/font.c Mon Jul 26 13:30:05 2010 +0900 @@ -4459,6 +4459,8 @@ } if (i == 3 || XINT (n) == 0) return Qnil; + if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) + LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); glyph = LGSTRING_GLYPH (gstring, 0); from = LGLYPH_FROM (glyph);