diff options
Diffstat (limited to 'src/pkg/fmt')
-rw-r--r-- | src/pkg/fmt/format.go | 2 | ||||
-rw-r--r-- | src/pkg/fmt/print.go | 2 | ||||
-rw-r--r-- | src/pkg/fmt/scan.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/fmt/format.go b/src/pkg/fmt/format.go index 2637eb4cd..c7a67d3bd 100644 --- a/src/pkg/fmt/format.go +++ b/src/pkg/fmt/format.go @@ -168,7 +168,7 @@ func (f *fmt) fmt_boolean(v bool) { // integer; interprets prec but not wid. Once formatted, result is sent to pad() // and then flags are cleared. func (f *fmt) integer(a int64, base uint64, signedness bool, digits string) { - var buf []byte = &f.intbuf + var buf []byte = f.intbuf[0:] negative := signedness == signed && a < 0 if negative { a = -a diff --git a/src/pkg/fmt/print.go b/src/pkg/fmt/print.go index e4413efa4..9c1940599 100644 --- a/src/pkg/fmt/print.go +++ b/src/pkg/fmt/print.go @@ -201,7 +201,7 @@ func (p *pp) add(c int) { if c < utf8.RuneSelf { p.buf.WriteByte(byte(c)) } else { - w := utf8.EncodeRune(c, &p.runeBuf) + w := utf8.EncodeRune(c, p.runeBuf[0:]) p.buf.Write(p.runeBuf[0:w]) } } diff --git a/src/pkg/fmt/scan.go b/src/pkg/fmt/scan.go index b082399fa..0c9ed4d76 100644 --- a/src/pkg/fmt/scan.go +++ b/src/pkg/fmt/scan.go @@ -95,7 +95,7 @@ func (r readRune) ReadRune() (rune int, size int, err os.Error) { if err != nil { break } - if !utf8.FullRune(&r.buf) { + if !utf8.FullRune(r.buf[0:]) { continue } if c, w := utf8.DecodeRune(r.buf[0:size]); w == size { |