diff options
author | Tucker Evans <tucker@tuckerevans.com> | 2020-07-21 15:45:24 -0400 |
---|---|---|
committer | Tucker Evans <tucker@tuckerevans.com> | 2020-07-21 15:45:24 -0400 |
commit | 16ee7b14f05a2c60df6a981dbd9e62eb0175afc1 (patch) | |
tree | 4d5292492a62060c2948ef529df1dba29cbcf44c | |
parent | 6eccbde8fcd7b14a5db5de96fde8c90eab5d1806 (diff) |
Fix map avl rotations
-rw-r--r-- | collections/map/map.c | 4 |
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); } } |