From 19d1830bc496701589558435a80906d10d1b3257 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 11 Oct 2005 20:10:15 +0000 Subject: [PATCH] (babies): Err, the maxpop case wasn't an optimization... Without that, we get negative babies, which leads to negative avail and baby food (cannibalism?) in grow_people(). Restore it. --- src/lib/update/human.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/update/human.c b/src/lib/update/human.c index 075a18ec..12498972 100644 --- a/src/lib/update/human.c +++ b/src/lib/update/human.c @@ -284,6 +284,9 @@ babies(int adults, int etu, double brate, int food, int maxpop) { int new_birth, new_food, new; + if (adults >= maxpop) + return 0; + new_birth = roundavg(brate * etu * adults); if (opt_NOFOOD) new_food = new_birth;