aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collections/map/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/collections/map/map.c b/collections/map/map.c
index 218ec4c..3b9af61 100644
--- a/collections/map/map.c
+++ b/collections/map/map.c
@@ -120,14 +120,14 @@ struct map_node **root;
if(map_bal_factor((*root)->left) >= 0) {
map_rotate_right(root);
} else {
- map_rotate_right(root);
+ map_rotate_right(&(*root)->left);
map_rotate_left(root);
}
} else {
if (map_bal_factor((*root)->right) >= 0) {
map_rotate_left(root);
} else {
- map_rotate_left(root);
+ map_rotate_left(&(*root)->right);
map_rotate_right(root);
}
}