Update du4/program.c
This commit is contained in:
parent
36c2dd5a16
commit
4bbb299f45
@ -49,8 +49,7 @@ int main() {
|
||||
int has_data = 0;
|
||||
|
||||
while (fgets(line, sizeof(line), stdin)) {
|
||||
if (sscanf(line, "%d %[^
|
||||
]", &votes, name) != 2 || votes < 0) {
|
||||
if (sscanf(line, "%d %[^\n]", &votes, name) != 2 || votes < 0) {
|
||||
break;
|
||||
}
|
||||
Student *student = find_or_add(name);
|
||||
|
Loading…
Reference in New Issue
Block a user