diff --git a/swarm/storage/chunker.go b/swarm/storage/chunker.go index 918c0fc45b..2ea81403bf 100644 --- a/swarm/storage/chunker.go +++ b/swarm/storage/chunker.go @@ -379,7 +379,7 @@ func (self *LazyChunkReader) ReadAt(b []byte, off int64) (read int, err error) { return 0, err } if off+int64(len(b)) >= size { - return len(b), io.EOF + return int(size - int64(off)), io.EOF } return len(b), nil }