fix integer overflow

This commit is contained in:
kapodamy 2020-03-25 16:13:36 -03:00
parent a19be79891
commit 5f940c40ed
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ public class DownloadRunnable extends Thread {
Log.d(TAG, mId + ":acquired block at position=" + block.position + " done=" + block.done);
}
long start = block.position * DownloadMission.BLOCK_SIZE;
long start = (long)block.position * DownloadMission.BLOCK_SIZE;
long end = start + DownloadMission.BLOCK_SIZE - 1;
start += block.done;