From 5bd02f982a878312065b4d81d05a90bc41a98c6c Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 8 Jan 2023 21:59:27 +0000 Subject: [PATCH] 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. --- mines.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mines.c b/mines.c index 25b2206..8af7c20 100644 --- a/mines.c +++ b/mines.c @@ -2690,6 +2690,9 @@ static game_state *execute_move(const game_state *from, const char *move) return ret; } else { + /* Dead players should stop trying to move. */ + if (from->dead) + return NULL; ret = dup_game(from); while (*move) {