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 */