Sort the transfer chunks by index

The default comparison ordered the pointers, not the chunk indexes.
This commit is contained in:
noctuum
2026-09-28 01:20:27 +05:00
committed by Jari Sundell
parent fc6e57c3fa
commit d98a441dc4
+2 -1
View File
@@ -57,7 +57,8 @@ WindowDownloadChunksSeen::redraw() {
const torrent::TransferList* transfers = m_download->download()->transfer_list();
std::vector<torrent::BlockList*> transferChunks(transfers->begin(), transfers->end());
std::sort(transferChunks.begin(), transferChunks.end());
std::sort(transferChunks.begin(), transferChunks.end(),
[](const auto& left, const auto& right) { return left->index() < right->index(); });
std::vector<torrent::BlockList*>::const_iterator itrTransfer = transferChunks.begin();