From: Andrei Zmievski Date: Wed, 17 May 2000 12:51:37 +0000 (+0000) Subject: Let's cast it. X-Git-Tag: php-4.0.0~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2e636348803183b0cecf33dad51da0df24a34b5;p=php Let's cast it. --- 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);