mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
Fixed return value of LazyChunkReader.readAt
It returned the full buffer size even when it was only partially filled
This commit is contained in:
parent
05ab6ee523
commit
61f5aa4e01
1 changed files with 1 additions and 1 deletions
|
|
@ -379,7 +379,7 @@ func (self *LazyChunkReader) ReadAt(b []byte, off int64) (read int, err error) {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
if off+int64(len(b)) >= size {
|
if off+int64(len(b)) >= size {
|
||||||
return len(b), io.EOF
|
return int(size - int64(off)), io.EOF
|
||||||
}
|
}
|
||||||
return len(b), nil
|
return len(b), nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue