Fix display/UI crash and correctness bugs (@sirus20x6)

This commit is contained in:
rakshasa
2026-03-16 16:01:36 +01:00
committed by Jari Sundell
parent 674ae767aa
commit 38fc815d52
7 changed files with 15 additions and 11 deletions
+2
View File
@@ -60,6 +60,8 @@ retrieve_p_options_str(torrent::Peer* peer) {
torrent::Object
retrieve_p_completed_percent(torrent::Peer* peer) {
if (peer->bitfield()->size_bits() == 0)
return int64_t(0);
return (100 * peer->bitfield()->size_set()) / peer->bitfield()->size_bits();
}