summaryrefslogtreecommitdiff
path: root/src/pkg/bytes/buffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/bytes/buffer.go')
-rw-r--r--src/pkg/bytes/buffer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/bytes/buffer.go b/src/pkg/bytes/buffer.go
index 7a996c4ca..32571d8d8 100644
--- a/src/pkg/bytes/buffer.go
+++ b/src/pkg/bytes/buffer.go
@@ -74,7 +74,7 @@ func (b *Buffer) grow(n int) int {
if len(b.buf)+n > cap(b.buf) {
var buf []byte
if b.buf == nil && n <= len(b.bootstrap) {
- buf = &b.bootstrap
+ buf = b.bootstrap[0:]
} else {
// not enough space anywhere
buf = make([]byte, 2*cap(b.buf)+n)
@@ -181,7 +181,7 @@ func (b *Buffer) WriteRune(r int) (n int, err os.Error) {
b.WriteByte(byte(r))
return 1, nil
}
- n = utf8.EncodeRune(r, &b.runeBytes)
+ n = utf8.EncodeRune(r, b.runeBytes[0:])
b.Write(b.runeBytes[0:n])
return n, nil
}