From 2f6efd835d794222d42196ae51fa8294f9b9a992 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 16 Sep 2019 15:00:20 +0200 Subject: [PATCH] Fixed bug #78545 By using an explicit (double) cast. --- Zend/zend_operators.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index b7d9800abb..04fdf0f358 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -91,10 +91,10 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end); #if SIZEOF_ZEND_LONG == 4 -# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > ZEND_LONG_MAX || (d) < ZEND_LONG_MIN)) +# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN)) #else /* >= as (double)ZEND_LONG_MAX is outside signed range */ -# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= ZEND_LONG_MAX || (d) < ZEND_LONG_MIN)) +# define ZEND_DOUBLE_FITS_LONG(d) (!((d) >= (double)ZEND_LONG_MAX || (d) < (double)ZEND_LONG_MIN)) #endif #if ZEND_DVAL_TO_LVAL_CAST_OK -- 2.40.0