fix crash in turn 1181

This commit is contained in:
Enno Rehling 2020-08-15 23:29:40 +02:00
parent 78b9149636
commit afa160c4c3
1 changed files with 1 additions and 1 deletions

View File

@ -557,7 +557,7 @@ void set_level(unit * u, skill_t sk, int value)
{ {
skill *sv = u->skills; 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); assert(value <= CHAR_MAX && value >= CHAR_MIN);
if (!skill_enabled(sk)) if (!skill_enabled(sk))
return; return;