mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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:
3
mines.c
3
mines.c
@ -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) {
|
||||||
|
Reference in New Issue
Block a user