diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-10-01 15:22:41 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-10-01 15:22:41 +0000 |
commit | 36cf6a2b051a2f67b747f02e0f0b3eb1525be48f (patch) | |
tree | a947da435f0282e7c36ccaec8d58732c28c71f63 /ext/json/json.c | |
parent | 5f15b1ef7afb377a3e9a01c170c1a49df907040b (diff) | |
download | php-git-36cf6a2b051a2f67b747f02e0f0b3eb1525be48f.tar.gz |
Fixed bug #42785 (json_encode() formats doubles according to locale rather
then following standard syntax).
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 2 |
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 { |