From 0711b51cfe0b95d40efa1cd851a804ce31d674c9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 28 May 2007 17:32:15 +0000 Subject: [PATCH] min/max confusion. again. --- src/common/gamecode/economy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index fc1949e78..ced171ce8 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1093,7 +1093,7 @@ recruit_archetype(unit * u, order * ord) if (a!=NULL) { maxsize -= a->data.i; } - n = max(maxsize/arch->size, n); + n = min(maxsize/arch->size, n); if (n<=0) { ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "recruit_capacity_exhausted", "building", u->building)); /* TODO: error message */