Skip to content

Commit

Permalink
util/RedBlackTree: fix lost "right" child while swapping with successor
Browse files Browse the repository at this point in the history
Fixes a tree corruption bug that led to assertion failures.
  • Loading branch information
MaxKellermann committed Apr 10, 2024
1 parent 615640f commit 66eaca2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util/RedBlackTree.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 66eaca2

Please sign in to comment.