mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
suppressed possible SIGFPE
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3811 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
285e020f13
commit
39991b7bf4
1 changed files with 4 additions and 0 deletions
|
@ -978,6 +978,10 @@ bool bdSpace::findRandomPeerWithFlag(bdId &id, uint32_t withFlag)
|
|||
{
|
||||
std::vector<bdBucket>::iterator it;
|
||||
uint32_t totalcount = calcSpaceSizeWithFlag(withFlag);
|
||||
|
||||
if(totalcount == 0)
|
||||
return false ;
|
||||
|
||||
uint32_t rnd = rand() % totalcount;
|
||||
uint32_t i = 0;
|
||||
uint32_t buck = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue