From afa160c4c3fa64d78b5857bcfa54e833c11dee26 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 15 Aug 2020 23:29:40 +0200 Subject: [PATCH] fix crash in turn 1181 --- src/kernel/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 6b4cbe2b0..bb289084a 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -557,7 +557,7 @@ void set_level(unit * u, skill_t sk, int value) { skill *sv = u->skills; - assert(sk != SK_MAGIC || !u->faction || u->number == 1 || fval(u->faction, FFL_NPC)); + assert(sk != SK_MAGIC || value==0 || !u->faction || u->number == 1 || fval(u->faction, FFL_NPC)); assert(value <= CHAR_MAX && value >= CHAR_MIN); if (!skill_enabled(sk)) return;