From: Dmitry Stogov Date: Fri, 16 Sep 2011 07:59:34 +0000 (+0000) Subject: Fixed bug #55644 (Math ops tests fail, diff min int value) X-Git-Tag: php-5.4.0beta2~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3741ad9739d6bba7041f7fb9562e0ff388110a0;p=php Fixed bug #55644 (Math ops tests fail, diff min int value) --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index fb0c39abc5..fae58b837d 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -659,7 +659,7 @@ static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *o if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK) && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(result) & LONG_SIGN_MASK))) { - Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2); + Z_DVAL_P(result) = (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2); Z_TYPE_P(result) = IS_DOUBLE; } else { Z_TYPE_P(result) = IS_LONG;