division by zero error

This commit is contained in:
Enno Rehling 2020-09-12 16:02:46 +02:00
parent 85f1207af0
commit b7aad91ffb
1 changed files with 0 additions and 1 deletions

View File

@ -777,7 +777,6 @@ int learn_skill(unit *u, skill_t sk, int days, int studycost) {
avail = get_pooled(u, get_resourcetype(R_SILVER), GET_DEFAULT, studycost * u->number);
if (avail < cost) {
/* not all students can afford the academy */
cost = avail;
n = n * avail / cost;
cost = n * studycost;
}