From: simon Date: Mon, 18 Jul 2005 18:54:06 +0000 (+0000) Subject: Fix to Chris's patch in r6106 (also from Chris). X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/b3408c3dda8258ff30605e6d9f35984ea077e3c7?hp=42159ec64bc26ce5d0ae2f8381f31a230ac4756e Fix to Chris's patch in r6106 (also from Chris). git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6117 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/rect.c b/rect.c index 318cde0..a7113af 100644 --- 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; }