Skip to content

Commit 4f0b2f9

Browse files
committed
fixed "mirrored" remaining students and checked rounding
1 parent 5ead7dd commit 4f0b2f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/automate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void autostudy_run(scholar scholars[], int nscholars)
170170
}
171171
}
172172
if (i > 0) {
173-
int remain = (STUDENTS_PER_TEACHER * scholars[t].u->number - i + STUDENTS_PER_TEACHER - 1) / STUDENTS_PER_TEACHER;
173+
int remain = i / STUDENTS_PER_TEACHER;
174174
/* teacher has remaining time */
175175
learning(scholars + t, remain);
176176
}

0 commit comments

Comments
 (0)