Stop it from crashing

This commit is contained in:
2024-03-04 17:04:05 +08:00
parent d54ff0f18c
commit e1afbdac3e
3 changed files with 5 additions and 1 deletions

@ -131,7 +131,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;
}