Commit 9b90266c authored by Andrey Semakin's avatar Andrey Semakin Committed by Alexandre Julliard

winemine: Mine random placing fix.

parent 4099ddb5
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment