diff options
Diffstat (limited to 'src/bytes/buffer.go')
| -rw-r--r-- | src/bytes/buffer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes/buffer.go b/src/bytes/buffer.go index 3eb5b350c3..6cb4d6a8f6 100644 --- a/src/bytes/buffer.go +++ b/src/bytes/buffer.go @@ -86,7 +86,7 @@ func (b *Buffer) Peek(n int) ([]byte, error) { if b.Len() < n { return b.buf[b.off:], io.EOF } - return b.buf[b.off:n], nil + return b.buf[b.off : b.off+n], nil } // empty reports whether the unread portion of the buffer is empty. |
