mirror of
https://github.com/transmission/transmission
synced 2025-02-04 21:43:03 +00:00
fix tr_stat error: fields desiredSize and desiredAvailable could be too large.
This commit is contained in:
parent
b796e37228
commit
d58d5210d0
1 changed files with 2 additions and 2 deletions
|
@ -790,9 +790,9 @@ tr_torrentStat( tr_torrent * tor )
|
||||||
|
|
||||||
for( i=0; i<tor->info.pieceCount; ++i ) {
|
for( i=0; i<tor->info.pieceCount; ++i ) {
|
||||||
if( !tor->info.pieces[i].dnd ) {
|
if( !tor->info.pieces[i].dnd ) {
|
||||||
s->desiredSize += tor->info.pieceSize;
|
s->desiredSize += tr_torPieceCountBytes( tor, i );
|
||||||
if( tr_bitfieldHas( available, i ) )
|
if( tr_bitfieldHas( available, i ) )
|
||||||
s->desiredAvailable += tor->info.pieceSize;
|
s->desiredAvailable += tr_torPieceCountBytes( tor, i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue