From 54e5f8a8d686435345cfb1c3d7f6b033aefc6c96 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 16 Apr 2020 08:02:03 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu6/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/du6/program.c b/du6/program.c index 013b211..2e1367f 100644 --- a/du6/program.c +++ b/du6/program.c @@ -35,7 +35,13 @@ int main() //char* r; //int q = 0; size_t pocet_znakov = 0; + int antiInfC = 0; while (fgets(line,wSIZE,stdin)) { + if(antiInfC == SIZE - 1){ + break; + } else{ + antiInfC++; + } k = 0; pocet_znakov = strlen(line); char* all = malloc(pocet_znakov);