aboutsummaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2009-12-17 23:42:13 +0200
committerPetri Lehtinen <petri@digip.org>2009-12-18 00:05:06 +0200
commitec96cbf01693a90db15a13c3e77f68909036989e (patch)
treed697085af6755c905cf664ff84176ed115e5c96e /CHANGES
parent7c707a73a2251c20afaecc028267b99d0ee60184 (diff)
downloadjansson-ec96cbf01693a90db15a13c3e77f68909036989e.zip
jansson-ec96cbf01693a90db15a13c3e77f68909036989e.tar.gz
jansson-ec96cbf01693a90db15a13c3e77f68909036989e.tar.bz2
Encode reals correctly
This patch changes the sprintf format from "%0.17f" to "%.17g", as the f format specifier doesn't print the exponent at all. This caused losing precision in all but the most simple cases. Because the g specifier doesn't print the decimal fraction or exponent if they're not needed, a ".0" has to be appended by hand in these cases. Otherwise the value's type changes from real to integer when decoding again. Thanks to Philip Grandinetti for reporting this issue.
Diffstat (limited to 'CHANGES')
0 files changed, 0 insertions, 0 deletions