diff --git a/src/downloadedpiecesbar.h b/src/downloadedpiecesbar.h index 974eed68d..5f9c5c96a 100644 --- a/src/downloadedpiecesbar.h +++ b/src/downloadedpiecesbar.h @@ -60,16 +60,16 @@ public: pix.fill(); pixmap = pix; } else { - const int nb_pieces = pieces.size(); + const qulonglong nb_pieces = pieces.size(); // Reduce the number of pieces before creating the pixmap // otherwise it can crash when there are too many pieces - if(nb_pieces > width()) { + if(nb_pieces > (uint)width()) { const int ratio = floor(nb_pieces/(double)width()); std::vector scaled_pieces; std::vector scaled_downloading; - for(int i=0; i