• Rob Pike's avatar
    fmt: fix up zero padding · f59064de
    Rob Pike authored
    If the padding is huge, we crashed by blowing the buffer. That's easy: make sure
    we have a big enough buffer by allocating in problematic cases.
    Zero padding floats was just wrong in general: the space would appear in the
    middle.
    
    Fixes #6044.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/12498043
    f59064de
fmt_test.go 26.6 KB