From 3eb4c202d2996981dce2e4177340dbd68905476d Mon Sep 17 00:00:00 2001 From: st529yr Date: Wed, 20 Mar 2024 15:22:28 +0100 Subject: [PATCH] funguje --- cv5/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv5/program.c b/cv5/program.c index 256eff8..bc93527 100644 --- a/cv5/program.c +++ b/cv5/program.c @@ -36,7 +36,7 @@ int main() { // Načítajte počet hlasov a meno študenta int votes; char name[MAX_NAME_LENGTH]; - if (sscanf(buffer, "%d %99[^\n]", &votes, name) != 2) { + if (sscanf(buffer, "%d %99s", &votes, name) != 2) { fprintf(stderr, "Chyba: Neplatný formát vstupu.\n"); return 1; }