]> granicus.if.org Git - php/commitdiff
Let's cast it.
authorAndrei Zmievski <andrei@php.net>
Wed, 17 May 2000 12:51:37 +0000 (12:51 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 17 May 2000 12:51:37 +0000 (12:51 +0000)
ext/standard/math.c

index 5671c9426a8f4bb25897f1663e131e091d6feab3..c78ff5633ce7a8ae64623ca3514acdee1930b48e 100644 (file)
@@ -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);