From 32bec0111a9efdecf5c717d8684496f347667e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Szab=C3=B3?= Date: Fri, 10 Apr 2020 09:23:04 +0200 Subject: [PATCH] c2 --- du5/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/du5/program.c b/du5/program.c index 1ca06a8..adc5838 100644 --- a/du5/program.c +++ b/du5/program.c @@ -40,11 +40,15 @@ int main(int argc, char const *argv[]){ if (r == NULL){ break; } + if(line[0]=='\n'){ + break; + } char* end = NULL; int value = strtol(line,&end,10); if (value == 0){ - break; + printf("Nepodarilo nacitat nic\n"); + return 0; } char tmp[SIZE]; memset(tmp, 0, SIZE);