From 7bed85420bbaeca9bded081055fca69aadec021c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 3 Feb 2002 02:40:37 +0000 Subject: [PATCH] division by zero error. --- src/eressea/korrektur.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index ca66f146d..4c090f001 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -2556,6 +2556,7 @@ peasant_adjustment(void) if(lifestyle(u) > 0) sum += u->number; } } + if (c==0) continue; avg = sum/c; for(r=regions; r; r=r->next) if(rterrain(r) == ter) {