From: foobar Date: Tue, 10 Apr 2007 10:57:35 +0000 (+0000) Subject: - Fixed ZEND_SIGNED_MULTIPLY_LONG() so that ext/filter/tests/046.phpt wont fail.... X-Git-Tag: php-5.2.2RC1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26761c42220aedca8f12b9bd18d0fcd447717df2;p=php - Fixed ZEND_SIGNED_MULTIPLY_LONG() so that ext/filter/tests/046.phpt wont fail. (Integer overflow) --- diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h index e32ccda960..14deb09308 100644 --- a/Zend/zend_multiply.h +++ b/Zend/zend_multiply.h @@ -35,8 +35,8 @@ #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ long __lres = (a) * (b); \ - double __dres = (double)(a) * (double)(b); \ - double __delta = (double) __lres - __dres; \ + long double __dres = (long double)(a) * (long double)(b); \ + long double __delta = (long double) __lres - __dres; \ if ( ((usedval) = (( __dres + __delta ) != __dres))) { \ (dval) = __dres; \ } else { \