fix ms compile warnings

This commit is contained in:
Sterling Hughes 2001-09-06 06:41:16 +00:00
parent 6883b92116
commit 8a156d9a39

View File

@ -245,7 +245,7 @@ PHP_FUNCTION(mt_srand)
* -RL
*/
#define RAND_RANGE(__n, __min, __max) \
(__n) = (__min) + (int)((double)(__max) - (__min) + 1.0) * ((__n) / (PHP_RAND_MAX + 1.0))
(__n) = (__min) + (long) ((double) ((__max) - (__min) + 1.0)) * ((__n) / (PHP_RAND_MAX + 1.0))
/* {{{ proto int rand([int min, int max])
Returns a random number */