fix piece size calculation

This commit is contained in:
Zlatin Balevsky
2019-06-24 18:29:00 +01:00
parent 51425bbfd9
commit 8773eb4ee0

View File

@@ -30,7 +30,7 @@ public class SharedFile {
long length = file.length();
int rawPieceSize = 0x1 << pieceSize;
int rv = (int) (length / rawPieceSize);
if (length % pieceSize != 0)
if (length % rawPieceSize != 0)
rv++;
return rv;
}