diff --git a/cv8/program.c b/cv8/program.c index b5db246..72f1e74 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -57,7 +57,11 @@ void ask(struct node* tree){ return; } char buff[SIZE]; - char* r = fgets(buff, SIZE, stdin);; + char* r = fgets(buff, SIZE, stdin); + if(r == NULL){ + puts("Koniec vstupu"); + return; + } while(r[0] == '\n'){ r = fgets(buff, SIZE, stdin); }