diff options
author | Matt Wilmas <mattwil@php.net> | 2008-12-02 14:50:37 +0000 |
---|---|---|
committer | Matt Wilmas <mattwil@php.net> | 2008-12-02 14:50:37 +0000 |
commit | 7c53e812737d80a236d92297594177e57aeb375b (patch) | |
tree | 422395236e7ea7da80ec5a18c071266da3cda755 /ext/json/JSON_parser.c | |
parent | 173069ceadae1c04d6a6a7e993e65425e475a382 (diff) | |
download | php-git-7c53e812737d80a236d92297594177e57aeb375b.tar.gz |
MFH: Changed logic for LONG_MIN
Diffstat (limited to 'ext/json/JSON_parser.c')
-rw-r--r-- | ext/json/JSON_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c index 70ca182953..972821a6e1 100644 --- a/ext/json/JSON_parser.c +++ b/ext/json/JSON_parser.c @@ -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); |