summaryrefslogtreecommitdiff
path: root/ext/json/json_encoder.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-25 10:59:05 +0100
committerAnatol Belski <ab@php.net>2015-03-25 15:32:35 +0100
commitfe36285de20a09760777fa674614a36b00b13cd1 (patch)
tree6066c28df2b2fa4b5e12ab4bb95444664cebf5e6 /ext/json/json_encoder.c
parent0ae011f3a7ed17fb1d0081f766ce5b5b73c759a6 (diff)
downloadphp-git-fe36285de20a09760777fa674614a36b00b13cd1.tar.gz
fix datatype mismatches
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 39b93b3adc..11630c9e58 100644
--- a/ext/json/json_encoder.c
+++ b/ext/json/json_encoder.c
@@ -104,7 +104,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, EG(precision), '.', 'e', &num[0]);
+ php_gcvt(d, (int)EG(precision), '.', 'e', &num[0]);
len = strlen(num);
if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_JSON_DOUBLE_MAX_LENGTH - 2) {
num[len++] = '.';