From 76649ebc55a243882ba6ac981f41c1d007b6f63a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 8 Jul 2019 10:43:57 -0700 Subject: Fixed number formatting bug by using libc sprintf. --- src/unstable/json.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index d3d8535..f6a8d52 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp @@ -424,7 +424,11 @@ void Bu::Json::write( Bu::Stream &sOutput ) const break; case Number: - sOutput.write(Bu::String("%1").arg( uDat.dNumber )); + { + char buf[64]; + sprintf( buf, "%f", uDat.dNumber ); + sOutput.write( buf ); + } break; case Boolean: -- cgit v1.2.3