]> git.eshelyaron.com Git - emacs.git/commitdiff
composite.c (composition_update_it): Fix indexing of LGSTRING_CHAR (Bug#15984).
authorKenichi Handa <handa@gnu.org>
Sun, 12 Jan 2014 23:23:55 +0000 (08:23 +0900)
committerKenichi Handa <handa@gnu.org>
Sun, 12 Jan 2014 23:23:55 +0000 (08:23 +0900)
src/ChangeLog
src/composite.c

index 637164281d421b17ee0a55515df589e71c705b15..4991d74135b0fe5b899eefbe80d5f1db1a64df4b 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-11  K. Handa  <handa@gnu.org>
+
+       * composite.c (composition_update_it): Fix indexing of
+       LGSTRING_CHAR (Bug#15984).
+
 2014-01-11  Fabrice Popineau  <fabrice.popineau@gmail.com>
 
        * unexw32.c (_start) [__MINGW64__]: Define to __start.
index 367fc8e3f9f99fcc0979e35012b1f9d8d7e51cc4..40cef814c1da1b552838d66585dc19364d3cd855 100644 (file)
@@ -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);
        }