mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
fix: off-by-one when marking a range of pieces as untested
This commit is contained in:
@@ -237,7 +237,9 @@ struct tr_torrent
|
||||
// if a file has changed, mark its pieces as unchecked
|
||||
if (mtime == 0 || mtime != mtimes[i])
|
||||
{
|
||||
checked_pieces_.unsetRange(info.files[i].firstPiece, info.files[i].lastPiece);
|
||||
auto const begin = info.files[i].firstPiece;
|
||||
auto const end = info.files[i].lastPiece + 1;
|
||||
checked_pieces_.unsetRange(begin, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user