Return correct next state from Read
This commit is contained in:
@ -127,8 +127,8 @@ type State[In any] struct {
|
||||
|
||||
func (s State[In]) Read(dst []In) (n uint64, next State[In], err error) {
|
||||
nread, err := s.r.ReadAt(dst, int64(s.pos))
|
||||
if n > 0 {
|
||||
s.pos += uint64(n)
|
||||
if nread > 0 {
|
||||
s.pos += uint64(nread)
|
||||
}
|
||||
return uint64(nread), s, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user