summaryrefslogtreecommitdiffstats
path: root/pokemod/Tile.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-20 00:12:12 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-20 00:12:12 +0000
commitdcb77408505e5fb40f064dd05aaf39f27dcdd524 (patch)
treec9de6f2a58d754511b7c821db58f8c0e881a0e1f /pokemod/Tile.cpp
parentf4f3176a6dcdaf5e463f39a657dd4ca04386a6ad (diff)
[FIX] Fraction bounds checking
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@102 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Tile.cpp')
-rw-r--r--pokemod/Tile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
index 80f7d7b4..833e7f78 100644
--- a/pokemod/Tile.cpp
+++ b/pokemod/Tile.cpp
@@ -149,8 +149,10 @@ void Tile::setFrom(const int direction, const bool state) throw(BoundsException)
m_from[direction] = state;
}
-void Tile::setWildChance(const Fraction& wildChance) throw(Exception)
+void Tile::setWildChance(const Fraction& wildChance) throw(BoundsException)
{
+ if (1 < wildChance)
+ error<BoundsException>("wildChance");
m_wildChance = wildChance;
}