From 86a0b0c0c9cf0674b55477a52ae80ef5635bbf64 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Wed, 8 Jul 2020 21:00:23 -0400 Subject: Fix map size was returning +1 for NULL leaves --- collections/map/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'collections/map') diff --git a/collections/map/map.c b/collections/map/map.c index f5751b5..021743d 100644 --- a/collections/map/map.c +++ b/collections/map/map.c @@ -90,7 +90,7 @@ int map_size_aux(root) struct map_node *root; { if (!root) - return 1; + return 0; return map_size_aux(root->left) + map_size_aux(root->right) + 1; } -- cgit v1.1