]> Cypherpunks repositories - gostls13.git/commit
fmt: float formatting should not permanently change width
authorMartin Möhrmann <martisch@uos.de>
Fri, 4 Mar 2016 14:52:35 +0000 (15:52 +0100)
committerRob Pike <r@golang.org>
Sat, 5 Mar 2016 03:01:22 +0000 (03:01 +0000)
commit783741844b48ebbe6b575369c915bfc1c6e53972
treeab48f6f4ec267e36941d944e964ce72011070a61
parent72d90d8238c00daf8893fa6b849e43a9e917e10e
fmt: float formatting should not permanently change width

formatFloat should restore the original f.wid value before
returning. Callers should not have to save and restore f.wid.

Fixes: #14642
Change-Id: I531dae15c7997fe8909e2ad1ef7c376654afb030
Reviewed-on: https://go-review.googlesource.com/20179
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/fmt_test.go
src/fmt/format.go