From 9ec1b936e53fcfbe5b248eb8f007f13d6342758a Mon Sep 17 00:00:00 2001 From: MoZhonghua Date: Thu, 23 Jun 2016 10:56:59 +0800 Subject: [PATCH] fillBuffer() should not return -1 when EOF --- reader.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reader.go b/reader.go index a1d85a2..e0a6d60 100644 --- a/reader.go +++ b/reader.go @@ -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