php/c1729272b17a1fe893d1a54e423d3b71470f3ee8.patch

23 lines
782 B
Diff
Raw Normal View History

From c1729272b17a1fe893d1a54e423d3b71470f3ee8 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 29 Aug 2018 09:10:59 +0200
Subject: [PATCH] fix double cast to int on 32-bit
---
Zend/zend_operators.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index cafb14d4cc25..9a8a40142433 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -3101,7 +3101,7 @@ ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d)
if (dmod < 0) {
/* we're going to make this number positive; call ceil()
* to simulate rounding towards 0 of the negative number */
- dmod = ceil(dmod);// + two_pow_32;
+ dmod = ceil(dmod) + two_pow_32;
}
return (zend_long)(zend_ulong)dmod;
}