summaryrefslogtreecommitdiffstats
path: root/pokemod/Fraction.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-07-26 21:15:33 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-07-26 21:15:33 +0000
commit227d31690824c44d4e92dc4fed07a8c43ea8cfb9 (patch)
treed670b44e51da56d0f232e99a4270648b51164640 /pokemod/Fraction.cpp
parente260085a116271e49c3d1d835eac1df70424f4c6 (diff)
downloadsigen-227d31690824c44d4e92dc4fed07a8c43ea8cfb9.tar.gz
sigen-227d31690824c44d4e92dc4fed07a8c43ea8cfb9.tar.xz
sigen-227d31690824c44d4e92dc4fed07a8c43ea8cfb9.zip
[FIX] Fixed an infinite loop in Fraction::reduce
[FIX] FractionWidget's behavior is now an enum [FIX] Fixed up some stuff in KAboutData for pokemodr [FIX] ScriptWidget value is set at construction now [DEL] Removed Pokemodr.h (nothing useful) git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@230 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Fraction.cpp')
-rw-r--r--pokemod/Fraction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/pokemod/Fraction.cpp b/pokemod/Fraction.cpp
index 0d69a889..a3075775 100644
--- a/pokemod/Fraction.cpp
+++ b/pokemod/Fraction.cpp
@@ -20,6 +20,8 @@
void Pokemod::Fraction::reduce()
{
+ if (!m_numerator || !m_denominator)
+ return;
int i = m_numerator;
int j = m_denominator;
if (i < 0)