From 5a8d55045442e21a0e12b09a62f5d672b7ea9aeb Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 17 Sep 2008 00:39:30 +0000 Subject: [PATCH] (Fcomposition_get_gstring): Make bigger gstring_work if necessary. --- src/ChangeLog | 5 +++++ src/composite.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index e19d60dbbb0..6dc57c60af7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-09-17 Kenichi Handa + + * composite.c (Fcomposition_get_gstring): Make bigger gstring_work + if necessary. + 2008-09-16 Kenichi Handa * coding.c (make_conversion_work_buffer): Avoid calling diff --git a/src/composite.c b/src/composite.c index 97524297988..576e0c8a402 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1496,6 +1496,8 @@ must be ignore. */) 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); -- 2.39.5