summaryrefslogtreecommitdiffstats
path: root/pokemod/Item.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-10-26 20:46:09 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-10-26 20:46:09 +0000
commit4385af885daf460a18e236f08509358f764b2c8c (patch)
tree6c2838312dd7f42769280e24e8abc16b53c165cb /pokemod/Item.cpp
parent1f08afc80c73087bf9bde639754670548b89fc9f (diff)
Reverted repo back to rev24 because committing of rev25 messed up
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@26 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Item.cpp')
-rw-r--r--pokemod/Item.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp
index 47d0f401..b0892600 100644
--- a/pokemod/Item.cpp
+++ b/pokemod/Item.cpp
@@ -185,8 +185,11 @@ unsigned PokeGen::PokeMod::Item::GetEffectCount() const
const PokeGen::PokeMod::ItemEffect* PokeGen::PokeMod::Item::NewEffect(Ini* const ini)
{
unsigned i = 0;
- for (; (i < GetEffectCount()) && (GetEffectByID(i) != UINT_MAX); ++i)
- ;
+ for (; i < GetEffectCount(); ++i)
+ {
+ if (GetEffectByID(i) == UINT_MAX)
+ break;
+ }
ItemEffect newEffect(pokemod, i);
if (ini)
newEffect.ImportIni(*ini);