diff --git a/reader.go b/reader.go index 5c795e6..280c4ff 100644 --- a/reader.go +++ b/reader.go @@ -33,6 +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 + } r.buf = make([]byte, readBufSize) return nil }