]> Cypherpunks repositories - gostls13.git/commit
fmt: fix bug printing large zero-padded hexadecimal
authorRob Pike <r@golang.org>
Thu, 16 Jan 2014 17:48:23 +0000 (09:48 -0800)
committerRob Pike <r@golang.org>
Thu, 16 Jan 2014 17:48:23 +0000 (09:48 -0800)
commitfc908a0298f574948ebf4eab62cf319319e77020
treec9c5b802348b8e981693a93495af1c6cba5ebf66
parentca9975a45e3597fc81418c85d95175249500cd7b
fmt: fix bug printing large zero-padded hexadecimal
We forgot to include the width of "0x" when computing the crossover
from internal buffer to allocated buffer.
Also add a helper function to the test for formatting large zero-padded
test strings.

Fixes #6777.

R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/50820043
src/pkg/fmt/fmt_test.go
src/pkg/fmt/format.go