From ebbe907bb7ad33844b3f10aa87a03471acd1f227 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Mon, 8 Nov 2021 01:32:30 +0800 Subject: [PATCH] util/tree: fix FirstNode --- util/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/tree.c b/util/tree.c index 60fceae..cc15c39 100644 --- a/util/tree.c +++ b/util/tree.c @@ -134,7 +134,7 @@ tree_Node *tree_FirstNode(tree_Tree *tree) { tree_Node *result = tree->root; if (!result) return 0; - while (result->right) + while (result->left) result = result->left; return result; }