Fix implicit-int-float-conversion warning in bombs demo
This commit is contained in:
parent
3c368408fb
commit
81a5efb6ab
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ bool BombsGame::Init(int aWidth, int aHeight, bool easyCorner)
|
|||
{
|
||||
for(y=0; y<m_height; y++)
|
||||
{
|
||||
m_field[x+y*m_width] = ((float)rand()/RAND_MAX <PROB)
|
||||
m_field[x+y*m_width] = (rand()/(float)RAND_MAX <PROB)
|
||||
? BG_HIDDEN | BG_BOMB
|
||||
: BG_HIDDEN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue