From 55dad663a42c7dad0dcf0451a5e66f7507872b8d Mon Sep 17 00:00:00 2001 From: vj586da Date: Fri, 26 Nov 2021 03:45:45 +0100 Subject: [PATCH] Oprava otazok --- cv8/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }