From 6e48267a3d22e02ffa51e0c627b841628812f89c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 23 Sep 2010 14:54:49 -0400 Subject: [PATCH] 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. --- src/ChangeLog | 2 +- src/intervals.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5