mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
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:
parent
f1a056dd93
commit
dd114e54d7
1 changed files with 17 additions and 14 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue