Patch json-invalid-printf-conversion-type-k-patch for Compile Warning Bug #66674
Patch version 2014-02-08 12:24 UTC
Return to Bug #66674 |
Download this patch
Patch Revisions:
Developer: tom@bignm.com
--- json.c 2014-02-08 09:22:33.873425390 -0300
+++ json.c.new 2014-02-08 09:22:00.943377097 -0300
@@ -405,7 +405,7 @@
} else if (type == IS_DOUBLE) {
if (!zend_isinf(d) && !zend_isnan(d)) {
char *tmp;
- int l = spprintf(&tmp, 0, "%.*k", (int) EG(precision), d);
+ int l = spprintf(&tmp, 0, "%.*g", (int) EG(precision), d);
smart_str_appendl(buf, tmp, l);
efree(tmp);
} else {
@@ -616,7 +616,7 @@
double dbl = Z_DVAL_P(val);
if (!zend_isinf(dbl) && !zend_isnan(dbl)) {
- len = spprintf(&d, 0, "%.*k", (int) EG(precision), dbl);
+ len = spprintf(&d, 0, "%.*g", (int) EG(precision), dbl);
smart_str_appendl(buf, d, len);
efree(d);
} else {
|