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:
Andrey Semakin 2017-02-12 12:50:04 +05:00 committed by Alexandre Julliard
parent 4099ddb521
commit 9b90266cfb

View file

@ -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++;