Browse Source

Fixed mistakes from previous commit

tree_alloc
Cameron Weinfurt 1 year ago
parent
commit
ebc4bf428b
  1. 4
      tree_alloc.c

4
tree_alloc.c

@ -131,8 +131,8 @@ void repair_tree_after_insert(TreeAlloc *ta) {
if (uncle != NULL && uncle->color == COLOR_RED) {
parent->color = COLOR_BLACK;
uncle->color = COLOR_BLACK;
grandparent = COLOR_RED;
repair_tree(grandparent);
grandparent->color = COLOR_RED;
repair_tree_after_insert(grandparent);
} else {
if (ta == parent->left && parent == grandparent->left) {
rotate_left(parent);

Loading…
Cancel
Save