Fix logic error in ModuloBufReader

This commit is contained in:
Rob Watson 2021-11-16 07:49:44 +01:00
parent 911de4438b
commit 47e3e47216
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ func (r *ModuloBufReader) Read(p []byte) (int, error) {
rem := nr % r.modSize rem := nr % r.modSize
if rem != 0 { if rem != 0 {
// err is always nil // err is always nil
_, _ = r.buf.Write(p[nr-rem:]) _, _ = r.buf.Write(p[nr-rem : nr])
} }
return nr - rem, err return nr - rem, err