Skip to content

Commit

Permalink
fixed "mirrored" remaining students and checked rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
stm2 committed Feb 20, 2023
1 parent 5ead7dd commit 4f0b2f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/automate.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void autostudy_run(scholar scholars[], int nscholars)
}
}
if (i > 0) {
int remain = (STUDENTS_PER_TEACHER * scholars[t].u->number - i + STUDENTS_PER_TEACHER - 1) / STUDENTS_PER_TEACHER;
int remain = i / STUDENTS_PER_TEACHER;
/* teacher has remaining time */
learning(scholars + t, remain);
}
Expand Down

0 comments on commit 4f0b2f9

Please sign in to comment.