]> git.eshelyaron.com Git - emacs.git/commitdiff
Use EMACS_INT instead of EMACS_UINT in intervals.c.
authorEli Zaretskii <eliz@gnu.org>
Thu, 23 Sep 2010 18:54:49 +0000 (14:54 -0400)
committerEli Zaretskii <eliz@gnu.org>
Thu, 23 Sep 2010 18:54:49 +0000 (14:54 -0400)
 The latter causes crashes, since LENGTH macro in intervals.h:114 has to be
 able to return a negative number.

src/ChangeLog
src/intervals.c

index d83a4fbed173fea6a240a944fa937d1de5200a4d..eb6d82ee92ec7367c7787eb36b1c57d28ad3d012 100644 (file)
@@ -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)
index b3fd1ea4e08de3409b42599356f146d0e9875d33..421cce76db2ed980edb53dca08cefa84d374c556 100644 (file)
@@ -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;