Permalink
Browse files

MFB:- Fixed ZEND_SIGNED_MULTIPLY_LONG() so that ext/filter/tests/046.…

…phpt wont fail. (Integer overflow)
  • Loading branch information...
1 parent 28c5d45 commit d34248e5f2e028242ef3d945ddfa79778ff562ab foobar committed Apr 10, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 Zend/zend_multiply.h
View
@@ -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 { \

0 comments on commit d34248e

Please sign in to comment.