diff options
-rw-r--r-- | ext/standard/math.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c index 5671c9426a..c78ff5633c 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -132,7 +132,8 @@ PHP_FUNCTION(round) /* break omitted intentionally */ case IS_DOUBLE: - return_val = (Z_TYPE_PP(value) == IS_LONG) ? Z_LVAL_PP(value) : Z_DVAL_PP(value); + return_val = (Z_TYPE_PP(value) == IS_LONG) ? + (double)Z_LVAL_PP(value) : Z_DVAL_PP(value); f = pow(10.0, places); |