com php-src: Add cast: ext/json/json_encoder.c
| From: | Jakub Zelenka | Date: | Sun, 26 Jun 2016 12:26:43 +0000 |
| Subject: | com php-src: Add cast: ext/json/json_encoder.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92674@lists.php.net to get a copy of this message | ||
Commit: 5f5dc04fc26f47fbe5172e0517887ffe3a1ff6cc
Author: Yasuo Ohgaki <yohgaki@php.net> Mon, 31 Aug 2015 16:10:32 +0900
Committer: Jakub Zelenka <bukka@php.net> Sun, 26 Jun 2016 13:26:43 +0100
Parents: 3f23e6bca90545a180ac4dbc80712065b1281d74
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5f5dc04fc26f47fbe5172e0517887ffe3a1ff6cc
Log:
Add cast
Changed paths:
M ext/json/json_encoder.c
Diff:
diff --git a/ext/json/json_encoder..c b/ext/json/json_encoder.c
index b797e7d..48d082a 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++] = '.';