Fix logic error in ModuloBufReader
This commit is contained in:
parent
911de4438b
commit
47e3e47216
|
@ -524,7 +524,7 @@ func (r *ModuloBufReader) Read(p []byte) (int, error) {
|
|||
rem := nr % r.modSize
|
||||
if rem != 0 {
|
||||
// err is always nil
|
||||
_, _ = r.buf.Write(p[nr-rem:])
|
||||
_, _ = r.buf.Write(p[nr-rem : nr])
|
||||
}
|
||||
|
||||
return nr - rem, err
|
||||
|
|
Loading…
Reference in New Issue