* xfaces.c: Don't assume buffer size fits in 'int'.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Aug 2012 09:20:01 +0000 (02:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Aug 2012 09:20:01 +0000 (02:20 -0700)
src/ChangeLog
src/xfaces.c

index f238653..9ac301e 100644 (file)
@@ -1,6 +1,8 @@
 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        * xfaces.c (face_at_buffer_position): Remove unused local.
+       (face_at_buffer_position, face_for_overlay_string):
+       Don't assume buffer size fits in 'int'.
 
        Use C99-style 'extern inline' if available.
        * buffer.h (BUFFER_INLINE):
index e72670a..d6b9aae 100644 (file)
@@ -6101,7 +6101,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
   for (i = 0; i < noverlays; i++)
     {
       Lisp_Object oend;
-      int oendpos;
+      ptrdiff_t oendpos;
 
       prop = Foverlay_get (overlay_vec[i], propname);
       if (!NILP (prop))
@@ -6145,7 +6145,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   Lisp_Object prop, position;
   Lisp_Object frame;
-  int endpos;
+  ptrdiff_t endpos;
   Lisp_Object propname = mouse ? Qmouse_face : Qface;
   Lisp_Object limit1, end;
   struct face *default_face;