summaryrefslogtreecommitdiffstats
path: root/libgo/go/bytes/buffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/bytes/buffer.go')
-rw-r--r--libgo/go/bytes/buffer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/go/bytes/buffer.go b/libgo/go/bytes/buffer.go
index 3ae930384f6..85c1577985d 100644
--- a/libgo/go/bytes/buffer.go
+++ b/libgo/go/bytes/buffer.go
@@ -367,7 +367,7 @@ func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) {
return
}
-// readSlice is like readBytes but returns a reference to internal buffer data.
+// readSlice is like ReadBytes but returns a reference to internal buffer data.
func (b *Buffer) readSlice(delim byte) (line []byte, err error) {
i := IndexByte(b.buf[b.off:], delim)
end := b.off + i + 1
@@ -377,6 +377,7 @@ func (b *Buffer) readSlice(delim byte) (line []byte, err error) {
}
line = b.buf[b.off:end]
b.off = end
+ b.lastRead = opRead
return line, err
}
OpenPOWER on IntegriCloud