Skip to content

Commit

Permalink
Add cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasuo Ohgaki authored and bukka committed Jun 26, 2016
1 parent 3f23e6b commit 5f5dc04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/json/json_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++] = '.';
Expand Down

0 comments on commit 5f5dc04

Please sign in to comment.