This commit is contained in:
Tančáková 2024-03-20 15:22:28 +01:00
parent 741cb2bc0d
commit 3eb4c202d2

View File

@ -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;
}