summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index b3e7fa13a5..79c6fd5b9e 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -359,7 +359,7 @@ static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC) /* {{{ */
double dbl = Z_DVAL_P(val);
if (!zend_isinf(dbl) && !zend_isnan(dbl)) {
- len = spprintf(&d, 0, "%.*g", (int) EG(precision), dbl);
+ len = spprintf(&d, 0, "%.*k", (int) EG(precision), dbl);
smart_str_appendl(buf, d, len);
efree(d);
} else {