Skip to content

Commit dc47ec0

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fixed bug #64142 (dval to lval different behavior on ppc64)
2 parents ce005c0 + e67a2b9 commit dc47ec0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_operators.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ static zend_always_inline long zend_dval_to_lval(double d)
7979
#else
8080
static zend_always_inline long zend_dval_to_lval(double d)
8181
{
82-
if (d > LONG_MAX) {
82+
/* >= as (double)LONG_MAX is outside signed range */
83+
if (d >= LONG_MAX) {
8384
return (long)(unsigned long) d;
8485
}
8586
return (long) d;

0 commit comments

Comments
 (0)