You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Compiling and running the following program:
package main
import (
"fmt"
"bytes"
)
func main() {
buf := bytes.NewBuffer([]byte{1, 2, 3, 4, 5})
buf.ReadBytes(3)
next,_ := buf.ReadByte()
fmt.Println(next)
}
What is the expected output?
"4" should be printed
What do you see instead?
"1" is printed
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux
Which revision are you using? (hg identify)
867d37fb41a4 release.2011-02-01.1/release
Please provide any additional information below.
in src/pkg/bytes/buffer.go, right before the return for ReadBytes(), there should be the
line:
b.off += size
The text was updated successfully, but these errors were encountered:
by joelegasse:
The text was updated successfully, but these errors were encountered: