mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
MFH: Changed logic for LONG_MIN
This commit is contained in:
parent
2b1a411806
commit
d5295fc9c8
@ -285,7 +285,7 @@ static void json_create_zval(zval **z, smart_str *buf, int type)
|
||||
if (type == IS_LONG)
|
||||
{
|
||||
double d = zend_strtod(buf->c, NULL);
|
||||
if (d > LONG_MAX || d < -LONG_MAX) {
|
||||
if (d > LONG_MAX || d < LONG_MIN) {
|
||||
ZVAL_DOUBLE(*z, d);
|
||||
} else {
|
||||
ZVAL_LONG(*z, (long)d);
|
||||
|
Loading…
Reference in New Issue
Block a user