Browse Source

MFH: Fixed bug #47422 (modulus operator returns incorrect results on 64 bit linux)

PHP-5.2.1RC1
Matt Wilmas 18 years ago
parent
commit
0d4da18bdd
  1. 2
      Zend/zend_operators.c

2
Zend/zend_operators.c

@ -936,7 +936,7 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
return FAILURE; /* modulus by zero */
}
if (abs(op2->value.lval) == 1) {
if (op2->value.lval == -1) {
ZVAL_LONG(result, 0);
return SUCCESS;
}

Loading…
Cancel
Save