Skip to content

Commit

Permalink
Fixed use of find that crashes the program.
Browse files Browse the repository at this point in the history
  • Loading branch information
cathyjf committed Oct 8, 2010
1 parent dacfd27 commit f6033ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shoddybattle/Pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ bool Pokemon::validate(ScriptContext *cx, set<unsigned int> &violations) {
const ABILITY_LIST &abilities = m_species->getAbilities();
ABILITY_LIST::const_iterator ability =
find(abilities.begin(), abilities.end(), m_abilityName);
if (*ability != m_abilityName) {
if (ability == abilities.end()) {
violations.insert(5);
}

Expand Down

0 comments on commit f6033ff

Please sign in to comment.