From 389697e872169566d0ecf6d0ba298c1cee5fbf84 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Fri, 27 Jan 2017 15:15:32 -0500 Subject: [PATCH] Fix inability to train in mage lore --- src/pcedit/pc.editors.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pcedit/pc.editors.cpp b/src/pcedit/pc.editors.cpp index ffeaa315..e3a0901c 100644 --- a/src/pcedit/pc.editors.cpp +++ b/src/pcedit/pc.editors.cpp @@ -475,8 +475,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod // TODO: Even though it includes 19 and 20, these will never match since they're handled separately above for(int i = 0; i <= 20; i++) { std::string id_base = boost::lexical_cast(eSkill(i)); - if(item_hit.length() < id_base.length() + 2) continue; - if(id_base.compare(0, id_base.length(), item_hit, 0, id_base.length()) == 0) { + if(id_base.compare(0, id_base.length(), item_hit, 0, item_hit.length() - 2) == 0) { which_skill = eSkill(i); break; }