fix piece size calculation

pull/5/head
Zlatin Balevsky 2019-06-24 18:29:00 +01:00
parent 51425bbfd9
commit 8773eb4ee0
1 changed files with 1 additions and 1 deletions

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;
}