From: Brendan Hansen Date: Mon, 22 May 2023 20:54:16 +0000 (-0500) Subject: bugfix: more floating point printing bugs X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=dd4d6a7a2dd433a3b6c897d6192a171d82132eb6;p=onyx.git bugfix: more floating point printing bugs --- diff --git a/core/conv/conv.onyx b/core/conv/conv.onyx index 8a0f9424..fc483c3e 100644 --- a/core/conv/conv.onyx +++ b/core/conv/conv.onyx @@ -301,7 +301,7 @@ f64_to_str :: (f: f64, buf: [] u8, digits_after_decimal := 4) -> str { len += s1.count; if digits_after_decimal > 0 { - buf.data[s1.count + len] = #char "."; + buf.data[len] = #char "."; len += 1; digits := "0123456789";