diff options
author | Anatol Belski <ab@php.net> | 2014-08-18 16:50:54 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-18 16:50:54 +0200 |
commit | b8324e6d635450562ecb253af38f22105e19e460 (patch) | |
tree | eadecc2f5c251a20013c600212104b0ba4cce8bc /ext/standard/math.c | |
parent | 97e9d058f09c12161863e5c3832552eb5da3f3c6 (diff) | |
download | php-git-b8324e6d635450562ecb253af38f22105e19e460.tar.gz |
further fixes to ext/standard
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r-- | ext/standard/math.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c index 648408e840..267b8c0170 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -1422,16 +1422,16 @@ PHP_FUNCTION(fmod) Returns the integer division of the numerator by the divisor */ PHP_FUNCTION(intdiv) { - long numerator, divisor; + php_int_t numerator, divisor; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &numerator, &divisor) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &numerator, &divisor) == FAILURE) { return; } if (divisor == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Division by zero"); RETURN_BOOL(0); - } else if (divisor == -1 && numerator == LONG_MIN) { + } else if (divisor == -1 && numerator == PHP_INT_MIN) { /* Prevent overflow error/crash We don't return a float here as that violates function contract */ RETURN_INT(0); |