From 1f75cdd0238394b0fa80f1a786ddd6682b49b853 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Mon, 15 Feb 2021 18:40:59 +0900 Subject: [PATCH] Initialize buffer size each streaming decoding --- decode.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/decode.go b/decode.go index c235ff7..84ad4f0 100644 --- a/decode.go +++ b/decode.go @@ -150,6 +150,8 @@ func (d *Decoder) Decode(v interface{}) error { if err := dec.decodeStream(s, header.ptr); err != nil { return err } + s.reset() + s.bufSize = initBufSize return nil }