summaryrefslogtreecommitdiff
path: root/ext/json/json_encoder.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-01-18 16:31:24 +0000
committerJakub Zelenka <bukka@php.net>2015-01-18 16:31:24 +0000
commit3ddb5993ddcf0cb76a7f8900bfb2a6bcdc497302 (patch)
tree0aa0927a51761a6609c58ee56db971f27003a675 /ext/json/json_encoder.c
parent91386cb2879782c574d1f67b4c472f1f9b40d839 (diff)
downloadphp-git-3ddb5993ddcf0cb76a7f8900bfb2a6bcdc497302.tar.gz
Increase PHP_JSON_DOUBLE_MAX_LENGTH for fractional part
This is probably not necessary as such number is not realistic. It's just to be consistent with jsond extension.
Diffstat (limited to 'ext/json/json_encoder.c')
-rw-r--r--ext/json/json_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c
index 510163d823..5eb9f45573 100644
--- a/ext/json/json_encoder.c
+++ b/ext/json/json_encoder.c
@@ -33,9 +33,9 @@
/* double limits */
#include <float.h>
#if defined(DBL_MANT_DIG) && defined(DBL_MIN_EXP)
-#define PHP_JSON_DOUBLE_MAX_LENGTH (1 + DBL_MANT_DIG - DBL_MIN_EXP)
+#define PHP_JSON_DOUBLE_MAX_LENGTH (3 + DBL_MANT_DIG - DBL_MIN_EXP)
#else
-#define PHP_JSON_DOUBLE_MAX_LENGTH 1078
+#define PHP_JSON_DOUBLE_MAX_LENGTH 1080
#endif
ZEND_DECLARE_MODULE_GLOBALS(json)