fillBuffer() should not return -1 when EOF

This commit is contained in:
MoZhonghua 2016-06-23 10:56:59 +08:00
parent 331deca0a8
commit 9ec1b936e5

View File

@ -60,10 +60,8 @@ func (this *Reader) fillBuffer() int {
// track any reader error / EOF
if err != nil {
this.err = err
return -1
} else {
return bytesRead
}
return bytesRead
}
// implement the io.Reader interface