diff --git a/du4/program.c b/du4/program.c index 92e602e..4a479c0 100644 --- a/du4/program.c +++ b/du4/program.c @@ -49,7 +49,8 @@ int main() { int has_data = 0; while (fgets(line, sizeof(line), stdin)) { - if (sscanf(line, "%d %99[^"]", &votes, name) != 2 || votes < 0) { + if (sscanf(line, "%d %[^ +]", &votes, name) != 2 || votes < 0) { break; } Student *student = find_or_add(name); @@ -72,4 +73,3 @@ int main() { free_memory(); return 0; } -