From 67671fb1dcbfd46ddee7e753d6f545d25821d445 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 13 Jan 2014 08:23:55 +0900 Subject: [PATCH] composite.c (composition_update_it): Fix indexing of LGSTRING_CHAR (Bug#15984). --- src/ChangeLog | 5 +++++ src/composite.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 637164281d4..4991d74135b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-01-11 K. Handa + + * composite.c (composition_update_it): Fix indexing of + LGSTRING_CHAR (Bug#15984). + 2014-01-11 Fabrice Popineau * unexw32.c (_start) [__MINGW64__]: Define to __start. diff --git a/src/composite.c b/src/composite.c index 367fc8e3f9f..40cef814c1d 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1412,7 +1412,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff cmp_it->width = 0; for (i = cmp_it->nchars - 1; i >= 0; i--) { - c = XINT (LGSTRING_CHAR (gstring, i)); + c = XINT (LGSTRING_CHAR (gstring, cmp_it->from + i)); cmp_it->nbytes += CHAR_BYTES (c); cmp_it->width += CHAR_WIDTH (c); } -- 2.39.2