diff --git a/cv8/program.c b/cv8/program.c index 1fa36c1..393e55c 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -54,6 +54,7 @@ void search(struct tree* this){ if(buffer[0] == 'a'){ if(this->left->value[0] == '*'){ printf("%s\n", this->left->value); + printf("Koniec\n"); return; } printf("%s\n", this->left->value); @@ -64,6 +65,7 @@ void search(struct tree* this){ else if(buffer[0] == 'n'){ if(this->right->value[0] == '*'){ printf("%s\n", this->right->value); + printf("Koniec\n") return; } printf("%s\n", this->right->value); @@ -139,7 +141,7 @@ int main(){ printf("%s\n", tree->value); search(tree); destroy_tree(tree); - printf("Koniec\n"); + return 0; }