Commit f8a67d79 authored by Kyle Consalus's avatar Kyle Consalus Committed by Robert Griesemer

Fix incorrect reporting of error in Scanner.next() when Read reads > 0 bytes but returns os.EOF.

R=golang-dev, gri1, gri
CC=golang-dev
https://golang.org/cl/2083042
parent 3d76135e
......@@ -236,8 +236,10 @@ func (s *Scanner) next() int {
if s.srcEnd == 0 {
return EOF
}
s.error(err.String())
break
if err != os.EOF {
s.error(err.String())
break
}
}
}
// at least one byte
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment