chiark / gitweb /
Fix to Chris's patch in r6106 (also from Chris).
authorSimon Tatham <anakin@pobox.com>
Mon, 18 Jul 2005 18:54:06 +0000 (18:54 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 18 Jul 2005 18:54:06 +0000 (18:54 +0000)
[originally from svn r6117]
[r6106 == a31934f233581da07153af6b4ee717f1e63387dd]

rect.c

diff --git a/rect.c b/rect.c
index 318cde09b9d3b034a486c1f6ba8cec0e35df7352..a7113afc36cea1167cc0dad18b292ef3d6769967 100644 (file)
--- a/rect.c
+++ b/rect.c
@@ -2477,6 +2477,9 @@ static game_state *execute_move(game_state *from, char *move)
        vedge(ret,x1,y1) = !vedge(ret,x1,y1);
     }
 
+    sfree(ret->correct);
+    ret->correct = get_correct(ret);
+
     /*
      * We've made a real change to the grid. Check to see
      * if the game has been completed.
@@ -2494,9 +2497,6 @@ static game_state *execute_move(game_state *from, char *move)
            ret->completed = TRUE;
     }
 
-    sfree(ret->correct);
-    ret->correct = get_correct(ret);
-
     return ret;
 }