Skip to content

Commit

Permalink
Fix casting error in set_selected_size_bytes function (See rakshasa#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
chros authored and chros committed Mar 10, 2018
1 parent 6fdf306 commit a16efc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torrent/data/file_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ FileList::set_selected_size_bytes() {
return;
}

uint64_t selectedSizeBytes = (uint64_t)(selectedSizeChunks * m_chunkSize);
uint64_t selectedSizeBytes = (uint64_t)selectedSizeChunks * (uint64_t)m_chunkSize;

// Dealing with size of last chunk as it's usually smaller than the rest.
uint64_t remainder = m_torrentSize % (uint64_t)m_chunkSize;
Expand Down

0 comments on commit a16efc7

Please sign in to comment.