diff --git a/cv2/program.c b/cv2/program.c index 9f759a0..239fc62 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -23,18 +23,18 @@ int main(){ char vstup1[LINESIZE]; char vstup2[LINESIZE]; while (count < LINESIZE) { - if (fgets(vstup, LINESIZE, stdin)) { - vstup1[strcspn(vstup, "\n")] = '\0'; - if (strlen(vstup) == 0) { + if (fgets(vstup1, LINESIZE, stdin)) { + vstup1[strcspn(vstup1, "\n")] = '\0'; + if (strlen(vstup1) == 0) { break; } } else { break; } - if (fgets(vstup, LINESIZE, stdin)) { - vstup2[strcspn(vstup, "\n")] = '\0'; - if (strlen(vstup) == 0) { + if (fgets(vstup2, LINESIZE, stdin)) { + vstup2[strcspn(vstup2, "\n")] = '\0'; + if (strlen(vstup2) == 0) { break; } } else {