* src/intervals.c (set_intervals_multibyte_1): Fix bug#61887
When `total_length` is 0 there should be no subtree at all, but `delete_interval` only deletes one interval, so make sure we don't end up with some stale child of `i`.
This commit is contained in:
parent
b3e930d328
commit
adc04ad524
1 changed files with 3 additions and 0 deletions
|
@ -2333,6 +2333,9 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag,
|
||||||
|
|
||||||
if (TOTAL_LENGTH (i) == 0)
|
if (TOTAL_LENGTH (i) == 0)
|
||||||
{
|
{
|
||||||
|
/* Delete the whole subtree. */
|
||||||
|
i->left = NULL;
|
||||||
|
i->right = NULL;
|
||||||
delete_interval (i);
|
delete_interval (i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue