From 007d96fe10beb6c6d4f20c79851404be18a3418f Mon Sep 17 00:00:00 2001 From: Corey Kosak Date: Wed, 25 Nov 2015 16:54:30 -0500 Subject: [PATCH] c_avl_pick needs to update the 'size' field of the tree when it deletes a node. Signed-off-by: Florian Forster --- src/utils_avltree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils_avltree.c b/src/utils_avltree.c index ecaf3c91..139d23ac 100644 --- a/src/utils_avltree.c +++ b/src/utils_avltree.c @@ -648,6 +648,7 @@ int c_avl_pick (c_avl_tree_t *t, void **key, void **value) *value = n->value; free_node (n); + --t->size; rebalance (t, p); return (0); -- 2.30.2