diff options
Diffstat (limited to 'general/Frac.cpp')
-rw-r--r-- | general/Frac.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/general/Frac.cpp b/general/Frac.cpp index a47b005b..9cf47aca 100644 --- a/general/Frac.cpp +++ b/general/Frac.cpp @@ -24,7 +24,7 @@ void Frac::set(const int n, const int d) throw(Exception) { - if ((type == Improper) || ((n <= d) && (type == Proper)) || ((d < n) && (type == Over1))) + if (((type == Improper) || ((n <= d) && (type == Proper)) || ((d < n) && (type == Over1))) && (0 < d)) { num = n; denom = d; |