mirror of https://github.com/zlatinb/muwire
correctly determine if uploader has requested piece
parent
ed12d78a48
commit
c79e8712d0
|
@ -40,7 +40,7 @@ class ContentUploader extends Uploader {
|
||||||
if (satisfiable) {
|
if (satisfiable) {
|
||||||
int startPiece = range.start / (0x1 << pieceSize)
|
int startPiece = range.start / (0x1 << pieceSize)
|
||||||
int endPiece = range.end / (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)
|
satisfiable &= mesh.pieces.isDownloaded(i)
|
||||||
}
|
}
|
||||||
if (!satisfiable) {
|
if (!satisfiable) {
|
||||||
|
|
Loading…
Reference in New Issue