mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
bug #1659: Better check for integerness
This commit is contained in:
1 parent
58ad96203a
commit
96fcc3e0a5
1 file changed
+2
-1
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user