summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-09-16 15:00:20 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-09-16 15:00:20 +0200
commit2f6efd835d794222d42196ae51fa8294f9b9a992 (patch)
treecad994aa11de3c43701cccfcb6f6f3a4567ad6bf
parent8873df8e8653e2ffc1709b68f24c4a68536d8b84 (diff)
downloadphp-git-2f6efd835d794222d42196ae51fa8294f9b9a992.tar.gz
Fixed bug #78545
By using an explicit (double) cast.
-rw-r--r--Zend/zend_operators.h4
1 files 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