From: Kenichi Handa Date: Sun, 12 Jan 2014 23:23:55 +0000 (+0900) Subject: composite.c (composition_update_it): Fix indexing of LGSTRING_CHAR (Bug#15984). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67671fb1dcbfd46ddee7e753d6f545d25821d445;p=emacs.git composite.c (composition_update_it): Fix indexing of LGSTRING_CHAR (Bug#15984). --- 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); }