summaryrefslogtreecommitdiff
path: root/ext/json/json_encoder.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2015-08-31 16:10:32 +0900
committerJakub Zelenka <bukka@php.net>2016-06-26 13:26:43 +0100
commit5f5dc04fc26f47fbe5172e0517887ffe3a1ff6cc (patch)
treeee5677ead45b54dff0876ae5b83853e64cad341a /ext/json/json_encoder.c
parent3f23e6bca90545a180ac4dbc80712065b1281d74 (diff)
downloadphp-git-5f5dc04fc26f47fbe5172e0517887ffe3a1ff6cc.tar.gz
Add cast
Diffstat (limited to 'ext/json/json_encoder.c')
-rw-r--r--ext/json/json_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c
index b797e7da3d..48d082a031 100644
--- a/ext/json/json_encoder.c
+++ b/ext/json/json_encoder.c
@@ -105,7 +105,7 @@ static inline void php_json_encode_double(smart_str *buf, double d, int options)
size_t len;
char num[PHP_JSON_DOUBLE_MAX_LENGTH];
- php_gcvt(d, JSON_G(precision), '.', 'e', num);
+ php_gcvt(d, (int)JSON_G(precision), '.', 'e', num);
len = strlen(num);
if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_JSON_DOUBLE_MAX_LENGTH - 2) {
num[len++] = '.';