mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix max size length
This commit is contained in:
@@ -29,6 +29,9 @@ func (p *MemPiece) WriteAt(b []byte, off int64) (n int, err error) {
|
|||||||
}
|
}
|
||||||
n = copy(p.buffer[off:], b[:])
|
n = copy(p.buffer[off:], b[:])
|
||||||
p.piece.Size += int64(n)
|
p.piece.Size += int64(n)
|
||||||
|
if p.piece.Size > p.piece.cache.pieceLength {
|
||||||
|
p.piece.Size = p.piece.cache.pieceLength
|
||||||
|
}
|
||||||
p.piece.Accessed = time.Now().Unix()
|
p.piece.Accessed = time.Now().Unix()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user