This commit is contained in:
Nuno Cruces
2023-09-20 15:07:07 +01:00
parent d9fcf60b7d
commit f5614bc2ed
3 changed files with 3 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ func (m *memFile) WriteAt(b []byte, off int64) (n int, err error) {
n = copy((*m.data[base])[rest:], b)
if n < len(b) {
// Assume writes are page aligned.
return 0, io.ErrShortWrite
return n, io.ErrShortWrite
}
if size := off + int64(len(b)); size > m.size {
m.size = size