From 96fcc3e0a5e27fe7106e87f3e60741c66f265c91 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 15 Dec 2012 00:58:47 +0100 Subject: [PATCH] bug #1659: Better check for integerness --- src/um/Quota.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/um/Quota.cc b/src/um/Quota.cc index d42dda0b48..581a969ce6 100644 --- a/src/um/Quota.cc +++ b/src/um/Quota.cc @@ -15,6 +15,7 @@ /* -------------------------------------------------------------------------- */ #include "Quota.h" +#include /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ @@ -435,7 +436,7 @@ string Quota::float_to_str(const float &num) { ostringstream oss; - if ( num - (int)num == 0.0 ) + if ( num == ceil(num) ) { oss.precision(0); }