mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 12:06:32 +00:00
winemine: Mine random placing fix.
Signed-off-by: Andrey Semakin <and-semakin@ya.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4099ddb521
commit
9b90266cfb
1 changed files with 2 additions and 2 deletions
|
@ -343,8 +343,8 @@ static void PlaceMines ( BOARD *p_board, int selected_col, int selected_row )
|
|||
/* create mines */
|
||||
i = 0;
|
||||
while( (unsigned) i < p_board->mines ) {
|
||||
col = (int) (p_board->cols * (float) rand() / RAND_MAX + 1);
|
||||
row = (int) (p_board->rows * (float) rand() / RAND_MAX + 1);
|
||||
col = rand() % p_board->cols + 1;
|
||||
row = rand() % p_board->rows + 1;
|
||||
|
||||
if( !p_board->box[col][row].IsMine ) {
|
||||
i++;
|
||||
|
|
Loading…
Reference in a new issue