diff --git a/cv8/program.c b/cv8/program.c index f65d4d0..3a55f0a 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -63,6 +63,10 @@ void ask(struct node* tree){ return; } r = fgets(buff, SIZE, stdin); + if(r == NULL){ + puts("Koniec vstupu"); + return; + } if(r[0] == 'a' && tree->left != NULL){ tree = tree->left; ask(tree);