From: Paul Eggert Date: Fri, 17 Jun 2011 07:57:42 +0000 (-0700) Subject: * buffer.c (struct sortstr.size, record_overlay_string): Don't truncate size to int. X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~69 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93cb6be35e90f37078276fe60142050d9cff524a;p=emacs.git * buffer.c (struct sortstr.size, record_overlay_string): Don't truncate size to int. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0f100823919..fcb6f66c279 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * buffer.c (struct sortvec.priority, struct sortstr.priority): Now EMACS_INT, not int. (compare_overlays, cmp_for_strings): Avoid subtraction overflow. + (struct sortstr.size, record_overlay_string): Don't truncate size to int. 2011-06-16 Paul Eggert diff --git a/src/buffer.c b/src/buffer.c index 4487de1450d..90a10ec2a34 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2926,7 +2926,7 @@ sort_overlays (Lisp_Object *overlay_vec, int noverlays, struct window *w) struct sortstr { Lisp_Object string, string2; - int size; + ptrdiff_t size; EMACS_INT priority; }; @@ -2962,7 +2962,8 @@ cmp_for_strings (const void *as1, const void *as2) } static void -record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size) +record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, + Lisp_Object str2, Lisp_Object pri, ptrdiff_t size) { EMACS_INT nbytes;