diff --git a/core/strconv/generic_float.odin b/core/strconv/generic_float.odin index 4ad42a647..6dc11c0be 100644 --- a/core/strconv/generic_float.odin +++ b/core/strconv/generic_float.odin @@ -104,8 +104,7 @@ generic_ftoa :: proc(buf: []byte, val: f64, fmt: byte, precision, bit_size: int) } else { switch fmt { case 'e', 'E': - prec += 1 - decimal.round(d, prec) + decimal.round(d, prec + 1) case 'f', 'F': decimal.round(d, d.decimal_point+prec) case 'g', 'G':