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 rakshasa
parent eebfb5f5e5
commit a84743b008
+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();