mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
Avoid assertion violation in intervals.c
* src/intervals.c (delete_interval): Allow negative values of LENGTH (i). This happens when delete_interval is called from set_intervals_multibyte_1, because the caller zeroes out the total_length field of the interval to be deleted. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00131.html for more details. See also a related old discussion at https://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00399.html.
This commit is contained in:
parent
18d1bc0a09
commit
d5750af151
1 changed files with 1 additions and 1 deletions
|
|
@ -1187,7 +1187,7 @@ delete_interval (register INTERVAL i)
|
|||
register INTERVAL parent;
|
||||
ptrdiff_t amt = LENGTH (i);
|
||||
|
||||
eassert (amt == 0); /* Only used on zero-length intervals now. */
|
||||
eassert (amt <= 0); /* Only used on zero total-length intervals now. */
|
||||
|
||||
if (ROOT_INTERVAL_P (i))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue