dmitry                                   Fri, 16 Sep 2011 07:59:34 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316848

Log:
Fixed bug #55644 (Math ops tests fail, diff min int value)

Bug: https://bugs.php.net/55644 (Assigned) Math ops tests fail, diff min int 
value
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/Zend/zend_operators.h
    U   php/php-src/trunk/Zend/zend_operators.h

Modified: php/php-src/branches/PHP_5_4/Zend/zend_operators.h
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_operators.h  2011-09-16 07:43:32 UTC 
(rev 316847)
+++ php/php-src/branches/PHP_5_4/Zend/zend_operators.h  2011-09-16 07:59:34 UTC 
(rev 316848)
@@ -659,7 +659,7 @@

                        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;

Modified: php/php-src/trunk/Zend/zend_operators.h
===================================================================
--- php/php-src/trunk/Zend/zend_operators.h     2011-09-16 07:43:32 UTC (rev 
316847)
+++ php/php-src/trunk/Zend/zend_operators.h     2011-09-16 07:59:34 UTC (rev 
316848)
@@ -659,7 +659,7 @@

                        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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to