diff --git a/du4/program.c b/du4/program.c index 9041b13..bcd3710 100644 --- a/du4/program.c +++ b/du4/program.c @@ -20,7 +20,7 @@ int main() { if (buffer[0] == '\n') continue; int current_votes = 0; char current_name[50] = ""; - sscanf(buffer, "%d %[^\n]", ¤t_votes, current_name); + if(sscanf(buffer, "%d %[^\n]", ¤t_votes, current_name) < 2 ) break; int is_contained = 0; for (int i=0; i