~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
UI change to Filling: allow multiple squares to be set at once.
[sgt/puzzles]
/
inertia.c
diff --git
a/inertia.c
b/inertia.c
index
4e84f56
..
dd80ebe
100644
(file)
--- a/
inertia.c
+++ b/
inertia.c
@@
-1626,6
+1626,10
@@
static game_state *execute_move(game_state *state, char *move)
sol->list[i] = move[i] - '0';
ret = dup_game(state);
ret->cheated = TRUE;
+ if (ret->soln && --ret->soln->refcount == 0) {
+ sfree(ret->soln->list);
+ sfree(ret->soln);
+ }
ret->soln = sol;
ret->solnpos = 0;
sol->refcount = 1;