don't forget the last few bytes

This commit is contained in:
Kimbsen 2020-06-23 16:53:49 +02:00
parent 8d1f6cd567
commit 38626cb584

View file

@ -103,9 +103,7 @@ type ChecksumReader struct {
func (cr *ChecksumReader) Read(p []byte) (int, error) {
n, err := cr.r.Read(p)
if err == nil {
cr.h.Write(p[:n])
}
cr.h.Write(p[:n])
return n, err
}