diff --git a/src/bindings/bind_unit.c b/src/bindings/bind_unit.c index 9de137d90..7084571d8 100644 --- a/src/bindings/bind_unit.c +++ b/src/bindings/bind_unit.c @@ -522,7 +522,9 @@ unit_addspell(unit * u, const char * name) slist=slist->next; } if (!spadd) log_error(("spell %s could not be found\n", name)); - else add_spell(starget, spadd); + else { + add_spell(starget, spadd); + } } static int diff --git a/src/gamecode/laws.c b/src/gamecode/laws.c index c5cb1173e..dc638e047 100644 --- a/src/gamecode/laws.c +++ b/src/gamecode/laws.c @@ -3596,14 +3596,6 @@ update_spells(void) if (FactionSpells() && maxlevel>f->max_spelllevel) { update_spellbook(f, maxlevel); - for (i=0;i!=n;++i) { - sc_mage *mage = get_mage(mages[i]); - while (mage->spells) { - spell_list * slist = mage->spells; - mage->spells = slist->next; - free(slist); - } - } } for (i=0;i!=n;++i) { updatespelllist(mages[i]);