From 8cabd04b757bf7bf48bf7b548a808aff71a78358 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 12 Sep 2020 16:02:46 +0200 Subject: [PATCH] division by zero error --- src/study.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/study.c b/src/study.c index 1229d6e60..e41d9185d 100644 --- a/src/study.c +++ b/src/study.c @@ -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; }