mirror of https://github.com/golang/go.git
fmt: fix formatter init
Width and precision may be abnormally large after format missing or wrong args.
This commit is contained in:
parent
a440cc0d70
commit
83aa3b1378
|
|
@ -57,6 +57,8 @@ func (f *fmt) clearflags() {
|
|||
|
||||
func (f *fmt) init(buf *buffer) {
|
||||
f.buf = buf
|
||||
f.wid = 0
|
||||
f.prec = 0
|
||||
f.clearflags()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue