changeset 98197:8bb9ca0754f1

(Fcomposition_get_gstring): Make bigger gstring_work if necessary.
author Kenichi Handa <handa@m17n.org>
date Wed, 17 Sep 2008 00:38:58 +0000
parents 0e384cdef05f
children 4d2dd786c063
files src/composite.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/composite.c	Tue Sep 16 08:28:18 2008 +0000
+++ b/src/composite.c	Wed Sep 17 00:38:58 2008 +0000
@@ -1496,6 +1496,8 @@
   gstring = gstring_lookup_cache (header);
   if (! NILP (gstring))
     return gstring;
+  if (LGSTRING_GLYPH_LEN (gstring_work) < to - from)
+    gstring_work = Fmake_vector (make_number (to - from + 2), Qnil);
   LGSTRING_SET_HEADER (gstring_work, header);
   LGSTRING_SET_ID (gstring_work, Qnil);
   fill_gstring_body (gstring_work);