From e2e636348803183b0cecf33dad51da0df24a34b5 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Wed, 17 May 2000 12:51:37 +0000 Subject: [PATCH] Let's cast it. --- ext/standard/math.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.50.1