diff --git a/src/kernel/item.c b/src/kernel/item.c index ba6504746..63ba87a53 100644 --- a/src/kernel/item.c +++ b/src/kernel/item.c @@ -925,7 +925,7 @@ struct order *ord) user->number); a_add(&f->attribs, make_key(atoi36("mbst"))); - set_level(user, findskill("magic"), 3); + set_level(user, SK_MAGIC, 3); ADDMSG(&user->faction->msgs, msg_message("use_item", "unit item", user, itype->rtype)); diff --git a/src/skill.test.c b/src/skill.test.c index 451f95d7c..248228a53 100644 --- a/src/skill.test.c +++ b/src/skill.test.c @@ -29,6 +29,7 @@ static void test_init_skill(CuTest *tc) { static void test_get_skill(CuTest *tc) { test_cleanup(); CuAssertIntEquals(tc, SK_ALCHEMY, findskill("alchemy")); + CuAssertIntEquals(tc, SK_MAGIC, findskill("magic")); CuAssertIntEquals(tc, SK_CROSSBOW, findskill("crossbow")); CuAssertIntEquals(tc, NOSKILL, findskill("")); CuAssertIntEquals(tc, NOSKILL, findskill("potato"));