bug #1659: Better check for integerness

This commit is contained in:
Ruben S. Montero authored and Tino Vazquez committed 2012-12-21 11:14:09 +01:00
1 parent 58ad96203a
commit 96fcc3e0a5
1 file changed
+2 -1
+2 -1
View File
@@ -15,6 +15,7 @@
/* -------------------------------------------------------------------------- */
#include "Quota.h"
#include <math.h>
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@@ -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);
}