fixed logic problem in addToTreeRec()

This commit is contained in:
Jonas Hofmann 2025-12-06 22:27:57 +01:00
parent 7dca38c37f
commit 494fa2237c

View File

@ -63,7 +63,7 @@ TreeNode *addToTreeRec(TreeNode *currentNode, TreeNode *newNode, CompareFctType
//duplicate
if (isDuplicate == NULL)
{
return newNode;
currentNode->left = addToTreeRec(currentNode->left, newNode, compareFct, isDuplicate);
}
else
{