correctly determine if uploader has requested piece

pull/5/head
Zlatin Balevsky 2019-06-21 20:36:33 +01:00
parent ed12d78a48
commit c79e8712d0
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class ContentUploader extends Uploader {
if (satisfiable) {
int startPiece = range.start / (0x1 << pieceSize)
int endPiece = range.end / (0x1 << pieceSize)
for (int i = startPiece; i < endPiece; i++)
for (int i = startPiece; i <= endPiece; i++)
satisfiable &= mesh.pieces.isDownloaded(i)
}
if (!satisfiable) {