* composite.c (composition_gstring_put_cache): Use unsigned integer.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 05:11:14 +0000 (22:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 05:11:14 +0000 (22:11 -0700)
src/ChangeLog
src/composite.c

index d7edbb6..787b3e2 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * composite.c (composition_gstring_put_cache): Use unsigned integer.
+
 2011-04-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * composite.h, composite.c (composition_gstring_put_cache):
index 1ce7bff..c18f9e8 100644 (file)
@@ -672,11 +672,11 @@ composition_gstring_put_cache (Lisp_Object gstring, EMACS_INT len)
   hash = h->hashfn (h, header);
   if (len < 0)
     {
-      len = LGSTRING_GLYPH_LEN (gstring);
-      for (i = 0; i < len; i++)
-       if (NILP (LGSTRING_GLYPH (gstring, i)))
+      EMACS_UINT j, glyph_len = LGSTRING_GLYPH_LEN (gstring);
+      for (j = 0; j < glyph_len; j++)
+       if (NILP (LGSTRING_GLYPH (gstring, j)))
          break;
-      len = i;
+      len = j;
     }
 
   copy = Fmake_vector (make_number (len + 2), Qnil);