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);