fix integer overflow

pull/9/head
Zlatin Balevsky 2019-07-07 10:58:39 +01:00
parent d5c92560db
commit bcce55b873
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class DownloadSession {
log.info("will download piece $piece from position $position steal $steal")
long pieceStart = piece * pieceSize
long pieceStart = piece * ((long)pieceSize)
long end = Math.min(fileLength, pieceStart + pieceSize) - 1
long start = pieceStart + position
String root = Base64.encode(infoHash.getRoot())