fix: incorrect magnet size calcuation in tr_completion (#2856)
This commit is contained in:
parent
e64430941f
commit
1f15933fda
|
@ -198,6 +198,10 @@ void tr_completion::removePiece(tr_piece_index_t piece)
|
|||
uint64_t tr_completion::countHasBytesInBlocks(tr_block_span_t span) const
|
||||
{
|
||||
auto const [begin, end] = span;
|
||||
if (begin >= end)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t n = blocks_.count(begin, end);
|
||||
n *= tr_block_info::BlockSize;
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
|
||||
[[nodiscard]] auto hasMetainfo() const noexcept
|
||||
{
|
||||
return completion.hasMetainfo() > 0;
|
||||
return completion.hasMetainfo();
|
||||
}
|
||||
|
||||
[[nodiscard]] auto hasAll() const
|
||||
|
|
Loading…
Reference in New Issue