Skip to content

Commit

Permalink
testRange
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnknownOne committed Dec 13, 2013
1 parent 25a2377 commit 53b49f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Server/scriptengine.cpp
Expand Up @@ -2356,8 +2356,7 @@ QScriptValue ScriptEngine::baseStats(int poke, int stat, int gen)
return -1;
}

if (stat < 0 || stat > 6) {
warn("baseStats(poke, stat, gen)", QString("Stat %1 doesn't exist.").arg(QString::number(stat)));
if (!testRange("baseStats(poke, stat, gen)", stat, 0, 6)) {
return -1;
}

Expand Down

0 comments on commit 53b49f4

Please sign in to comment.