diff --git a/cv8/program.c b/cv8/program.c index fbe51ec..28275a2 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -45,10 +45,13 @@ void search(struct tree* this){ printf("Koniec vstupu\n"); exit(0); } - else if(buffer[0] != 'a' || buffer[0] != 'n' || buffer[0] != '\n'){ + if(buffet[0] == '\n'){ + search(this); + } + if(buffer[0] != 'a' || buffer[0] != 'n' || buffer[0] != '\n'){ printf("Nerozumiem\n"); exit(0); - } + } if(buffer[0] == 'a'){ @@ -72,7 +75,7 @@ void search(struct tree* this){ search(this->right); } - search(this); + } void print_tree(struct tree* tree,int offset){