mirror of
https://github.com/php/php-src.git
synced 2024-09-26 20:37:29 +00:00
Changed logic for LONG_MIN
This commit is contained in:
parent
ba7bc0ace4
commit
509b50ed70
@ -278,7 +278,7 @@ static void json_create_zval(zval **z, smart_str *buf, int type TSRMLS_DC) /* {{
|
||||
|
||||
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