From dcb77408505e5fb40f064dd05aaf39f27dcdd524 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 20 Apr 2008 00:12:12 +0000 Subject: [FIX] Fraction bounds checking git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@102 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Move.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pokemod/Move.cpp') diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 9555ac25..d1d17641 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -172,8 +172,10 @@ void Move::setName(const QString& name) m_name = name; } -void Move::setAccuracy(const Fraction& accuracy) throw(Exception) +void Move::setAccuracy(const Fraction& accuracy) throw(BoundsException) { + if (1 < accuracy) + error("accuracy"); m_accuracy = accuracy; } -- cgit