Merge pull request #7494 from AkihiroSuda/diff-apply-fix-read-count

This commit is contained in:
Fu Wei
2022-10-10 20:53:51 +08:00
committed by GitHub

View File

@@ -125,6 +125,8 @@ type readCounter struct {
func (rc *readCounter) Read(p []byte) (n int, err error) {
n, err = rc.r.Read(p)
rc.c += int64(n)
if n > 0 {
rc.c += int64(n)
}
return
}