From 11404879f2e7ee02118852b6b42e19f99cb2edd9 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Thu, 9 Sep 2021 16:19:55 +0200 Subject: fix matchStream: encode prev if exists in epilogue --- repo.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'repo.go') diff --git a/repo.go b/repo.go index c023568..467567d 100644 --- a/repo.go +++ b/repo.go @@ -454,6 +454,10 @@ func (r *Repo) matchStream(stream io.Reader, version int) []Chunk { if len(buff) > 0 { var temp *TempChunk if len(buff) > r.chunkSize { + if prev != nil { + chunk, _ := r.encodeTempChunk(prev, version, &last) + chunks = append(chunks, chunk) + } prev = NewTempChunk(buff[:r.chunkSize]) temp = NewTempChunk(buff[r.chunkSize:]) } else { -- cgit v1.2.3