chiark / gitweb /
I arranged that dying after the game was already completed didn't
[sgt-puzzles.git] / inertia.c
index b490e04ab049816cf07a5f52942ed65da9a6f86f..e03db7e61dfb10a50161c56f21279f156b0035b3 100644 (file)
--- a/inertia.c
+++ b/inertia.c
@@ -710,11 +710,11 @@ static void game_changed_state(game_ui *ui, game_state *oldstate,
     /*
      * Increment the deaths counter. We only do this if
      * ui->just_made_move is set (redoing a suicide move doesn't
-     * kill you _again_), and also we only do it if the game isn't
-     * completed (once you're finished, you can play).
+     * kill you _again_), and also we only do it if the game wasn't
+     * already completed (once you're finished, you can play).
      */
     if (!oldstate->dead && newstate->dead && ui->just_made_move &&
-       newstate->gems) {
+       oldstate->gems) {
        ui->deaths++;
        ui->just_died = TRUE;
     } else {