diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-12-29 20:01:45 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-12-29 20:01:45 +0100 |
commit | f888fd49746332035ff556683e2b0251e577278f (patch) | |
tree | 872dd501ebce8dd64b713c3ac585cde24e314bd7 /src | |
parent | 98df85ffd0d91f64bf9350becb17594da795148c (diff) |
ostream: wider float range
Diffstat (limited to 'src')
-rw-r--r-- | src/object/outputstream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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)); } |