util/tree: fix FirstNode
This commit is contained in:
parent
e38a61a61a
commit
ebbe907bb7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user