diff options
author | Matt Wilmas <mattwil@php.net> | 2008-12-02 14:50:22 +0000 |
---|---|---|
committer | Matt Wilmas <mattwil@php.net> | 2008-12-02 14:50:22 +0000 |
commit | d5295fc9c83013b8eabcdf4d9f3b8a2c250575e4 (patch) | |
tree | 21db992816739aaa42c937cb890bf854c3374e21 /ext/json/JSON_parser.c | |
parent | 2b1a411806c7b0e5692d5472e4f1da4b002b330e (diff) | |
download | php-git-d5295fc9c83013b8eabcdf4d9f3b8a2c250575e4.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 1a3bd21e55..a90ade02de 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); |