changeset 109545:0526a9cf04a3

font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the number of glyphs gets smaller than the original length.
author Kenichi Handa <handa@etlken>
date Mon, 26 Jul 2010 13:30:05 +0900
parents 6b02202d9fdc (current diff) 197e874deb67 (diff)
children 018487fd2873
files
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <handa@m17n.org>
+
+	* 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  <lekktu@gmail.com>
 
 	* lread.c (unreadpure, mapatoms_1): Make static.
--- 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);