From 16ee7b14f05a2c60df6a981dbd9e62eb0175afc1 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Tue, 21 Jul 2020 15:45:24 -0400 Subject: Fix map avl rotations --- collections/map/map.c | 4 ++-- 1 file 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); } } -- cgit v1.1