small bug fix

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2161 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-31 13:21:37 +00:00
parent 0f7b6a0bb8
commit 153413c94d

View File

@ -189,7 +189,9 @@ void FileTransferInfoWidget::draw(const FileChunksInfo& info,QPainter *painter)
painter->drawText(0,y,tr("Availability map (")+QString::number(info.compressed_peer_availability_maps.size())+ tr(" sources")+")") ;
y += block_sep ;
int nb_chunks = info.file_size/info.chunk_size + !(info.file_size % info.chunk_size);
// Note (for non geeks): the !! operator transforms anything positive into 1 and 0 into 0.
//
int nb_chunks = info.file_size/info.chunk_size + !!(info.file_size % info.chunk_size);
for(uint i=0;i<availability_map_size_X;++i)
{