diff --git a/du6/program.c b/du6/program.c index 543056c..72760bd 100644 --- a/du6/program.c +++ b/du6/program.c @@ -45,9 +45,8 @@ void destroy_tree(Tree *tree) { int count_leaves(Tree *tree) { if (!tree) return 0; - if (!tree->left && !tree->right) - return 1; - return count_leaves(t->left) + count_leaves(t->right); + if (!tree->left && !tree->right) return 1; + return count_leaves(tree->left) + count_leaves(tree->right); } // spustenie znalostneho systemu