util/RedBlackTree: fix lost "right" child while swapping with successor

Fixes a tree corruption bug that led to assertion failures.
This commit is contained in:
Max Kellermann 2024-04-10 12:28:48 +02:00 committed by Max Kellermann
parent 88475f2e2b
commit b3a31b69ee

View File

@ -289,6 +289,7 @@ public:
assert(successor.parent != this);
successor.parent->SetChild(Direction::LEFT, *this);
successor.SetChild(Direction::RIGHT, &right);
}
p.SetChild(direction_in_parent, successor);