Mines: No moving once you're dead!

If a Mines save file contains a move after the player has already
died, this can lead to an assertion failure once there are more mines
that covered squares.  Better to just reject any move after the
player's died.
This commit is contained in:
Ben Harris
2023-01-08 21:59:27 +00:00
parent d3290195da
commit 5bd02f982a

View File

@ -2690,6 +2690,9 @@ static game_state *execute_move(const game_state *from, const char *move)
return ret; return ret;
} else { } else {
/* Dead players should stop trying to move. */
if (from->dead)
return NULL;
ret = dup_game(from); ret = dup_game(from);
while (*move) { while (*move) {