summaryrefslogtreecommitdiff
path: root/ext/json/JSON_parser.c
diff options
context:
space:
mode:
authorMatt Wilmas <mattwil@php.net>2008-12-02 14:50:22 +0000
committerMatt Wilmas <mattwil@php.net>2008-12-02 14:50:22 +0000
commitd5295fc9c83013b8eabcdf4d9f3b8a2c250575e4 (patch)
tree21db992816739aaa42c937cb890bf854c3374e21 /ext/json/JSON_parser.c
parent2b1a411806c7b0e5692d5472e4f1da4b002b330e (diff)
downloadphp-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.c2
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);