diff --git a/cv8/program.c b/cv8/program.c index 36d9a8a..a82b6d8 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -45,7 +45,7 @@ void search(struct tree* this){ printf("Koniec vstupu\n"); exit(0); } - if(buffer[0] != '\n'){ + if(buffer[0] == 'a'){ if(this->left->value[0] == '*'){ printf("%s\n", this->left->value); @@ -67,7 +67,13 @@ void search(struct tree* this){ search(this->right); } + + + + if(buffer[0] != '\n'){ + exit(0); } + else{ printf("Nerozumiem\n"); return;