Skip to content

Commit 8021bb2

Browse files
committed
Update format.go
1 parent ed0eea1 commit 8021bb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fmt/format.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ func (f *fmt) fmtFloat(v float64, size int, verb rune, prec int) {
564564
}
565565
if !hasDecimalPoint {
566566
// decimal 0 should contribute once to digits.
567-
if num[1] == '0' && len(num) == 2 {
567+
if len(num) == 2 && num[1] == '0' {
568568
digits--
569569
}
570570
num = append(num, '.')

0 commit comments

Comments
 (0)