From 22c6dd08a705eac7b51bb1b550dee4cc2560a016 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 29 Oct 2006 11:44:34 +0000 Subject: [PATCH] Zufaelle trafen immer die letzte Einheit. --- src/common/gamecode/randenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index 0fa4fc9a8..f58470a44 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -437,7 +437,7 @@ encounters(void) int n = rng_int() % c; for (u = r->units; u; u = u->next) { - if (i+u->number>c) break; + if (i+u->number>n) break; } assert(u && u->number); encounter(r, u);