From f888fd49746332035ff556683e2b0251e577278f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 29 Dec 2021 20:01:45 +0100 Subject: ostream: wider float range --- src/object/outputstream.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/object/outputstream.cc b/src/object/outputstream.cc index 3960a3e..b7c1bf4 100644 --- a/src/object/outputstream.cc +++ b/src/object/outputstream.cc @@ -182,6 +182,12 @@ void OutputStream::printf_float(float num) put('-'); num *= -1; } + if (num > 100000) { + put('0' + (((unsigned int)num % 1000000) / 100000)); + } + if (num > 10000) { + put('0' + (((unsigned int)num % 100000) / 10000)); + } if (num > 1000) { put('0' + (((unsigned int)num % 10000) / 1000)); } -- cgit v1.2.3