diff options
Diffstat (limited to 'src/fmt/print.go')
| -rw-r--r-- | src/fmt/print.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fmt/print.go b/src/fmt/print.go index cb393bd763..9596888854 100644 --- a/src/fmt/print.go +++ b/src/fmt/print.go @@ -703,6 +703,11 @@ func (p *pp) printArg(arg any, verb rune) { return } + // Bug fix: avoid padding strings with zeros. Issue 56486. + if verb == 's' { + p.fmt.zero = false + } + // Some types can be done without reflection. switch f := arg.(type) { case bool: |
