funguje
This commit is contained in:
parent
741cb2bc0d
commit
3eb4c202d2
@ -36,7 +36,7 @@ int main() {
|
|||||||
// Načítajte počet hlasov a meno študenta
|
// Načítajte počet hlasov a meno študenta
|
||||||
int votes;
|
int votes;
|
||||||
char name[MAX_NAME_LENGTH];
|
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");
|
fprintf(stderr, "Chyba: Neplatný formát vstupu.\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user