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