From: Eli Zaretskii Date: Thu, 23 Sep 2010 18:54:49 +0000 (-0400) Subject: Use EMACS_INT instead of EMACS_UINT in intervals.c. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~42^2~70 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e48267a3d22e02ffa51e0c627b841628812f89c;p=emacs.git Use EMACS_INT instead of EMACS_UINT in intervals.c. The latter causes crashes, since LENGTH macro in intervals.h:114 has to be able to return a negative number. --- diff --git a/src/ChangeLog b/src/ChangeLog index d83a4fbed17..eb6d82ee92e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -57,7 +57,7 @@ (move_if_not_intangible, get_local_map, copy_intervals) (copy_intervals_to_string, compare_string_intervals) (set_intervals_multibyte_1): Use EMACS_INT for buffer positions - and EMACS_UINT for interval tree size. + and for interval tree size. * intervals.h (traverse_intervals, split_interval_right) (split_interval_left, find_interval, offset_intervals) diff --git a/src/intervals.c b/src/intervals.c index b3fd1ea4e08..421cce76db2 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1326,8 +1326,8 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from, if (relative_position < LEFT_TOTAL_LENGTH (tree)) { EMACS_INT subtract = interval_deletion_adjustment (tree->left, - relative_position, - amount); + relative_position, + amount); tree->total_length -= subtract; CHECK_TOTAL_LENGTH (tree); return subtract;