Fix implicit-int-float-conversion warning in bombs demo
This commit is contained in:
parent
3c368408fb
commit
81a5efb6ab
@ -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…
Reference in New Issue
Block a user