diff --git a/reader.go b/reader.go index 280c4ff..cdc6764 100644 --- a/reader.go +++ b/reader.go @@ -33,10 +33,9 @@ func NewReader(src io.Reader) *Reader { func (r *Reader) Reset(src io.Reader) error { decoderStateInit(r) r.src = src - if r.buf != nil { - return nil + if r.buf == nil { + r.buf = make([]byte, readBufSize) } - r.buf = make([]byte, readBufSize) return nil }