From 3dd3761acd00ce65da6e066aa208e6339d6f3884 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 7 Dec 2014 11:14:14 +0100 Subject: [PATCH] prevent an invalid assert when undead heroes are magical --- src/kernel/unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 460a941bc..9e2a72e3f 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1190,7 +1190,8 @@ skill *add_skill(unit * u, skill_t id) sv->old = 0; sv->id = id; if (id == SK_MAGIC && u->faction && !fval(u->faction, FFL_NPC)) { - assert(u->number==1 && max_magicians(u->faction) >= u->number); + assert(u->number<=1); + assert(max_magicians(u->faction) >= u->number); } return sv; }