Fix inability to change skills in the training dialog

This commit is contained in:
2016-10-15 22:16:56 -04:00
parent c1bfc99164
commit 1b64eeaecf

View File

@@ -476,7 +476,7 @@ static bool spend_xp_event_filter(cDialog& me, std::string item_hit, eKeyMod mod
for(int i = 0; i <= 20; i++) {
std::string id_base = boost::lexical_cast<std::string>(eSkill(i));
if(item_hit.length() < id_base.length() + 2) continue;
if(id_base.compare(0, id_base.length(), item_hit) == 0) {
if(id_base.compare(0, id_base.length(), item_hit, 0, id_base.length()) == 0) {
which_skill = eSkill(i);
break;
}