From 95824f5404b2bd9890890b9ca34a1b7ee5edca36 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 19 Dec 2007 22:28:38 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/view.php?id=1245 "giving heros to another faction" --- src/common/kernel/unit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 87f76a9e9..f5968ae99 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -1408,14 +1408,13 @@ countheroes(const struct faction * f) { const unit * u = f->units; int n = 0; - int m = 0; while (u) { if (fval(u, UFL_HERO)) n+= u->number; u = u->nextF; } -#ifndef NDEBUG - m = maxheroes(f); +#ifdef DEBUG_MAXHEROES + int m = maxheroes(f); if (n>m) { log_warning(("%s has %d of %d heroes\n", factionname(f), n, m)); }