Skip to content

Commit

Permalink
Fix missing trailing 0s when formatting numbers with whole parts
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Oct 2, 2024
1 parent f58d039 commit d672e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/obj_long.c
Original file line number Diff line number Diff line change
Expand Up @@ -2770,7 +2770,7 @@ KrkValue krk_double_to_string(double a, unsigned int digits, char formatter, int
missing_digits = digits;
} else {
/* Number with possibly not enough digits */
trailing_zeros = digits - (actual + missing_digits);
trailing_zeros = digits - (actual - whole_digits + missing_digits);
}
} else if (alwaysexp) {
if (actual > digits) {
Expand Down

0 comments on commit d672e96

Please sign in to comment.