security fix to xprogressbar display

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2354 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-17 20:22:52 +00:00
parent f1a056dd93
commit dd114e54d7

View file

@ -196,6 +196,8 @@ void xProgressBar::paint()
uint32_t ss = _pinfo.nb_chunks ; uint32_t ss = _pinfo.nb_chunks ;
if(ss > 1) // for small files we use a more progressive display if(ss > 1) // for small files we use a more progressive display
{
if(!_pinfo.cmap._map.empty())
for(int i=0;i<ss;++i) for(int i=0;i<ss;++i)
{ {
int j=0 ; int j=0 ;
@ -212,6 +214,7 @@ void xProgressBar::paint()
i += j ; i += j ;
} }
}
else else
{ {
// calculate progress value // calculate progress value