~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further additions to the Guess docs.
[sgt/puzzles]
/
flip.c
diff --git
a/flip.c
b/flip.c
index
a5ee044
..
e6c4077
100644
(file)
--- a/
flip.c
+++ b/
flip.c
@@
-590,6
+590,8
@@
static char *new_game_desc(game_params *params, random_state *rs,
sprintf(ret, "%s,%s", mbmp, gbmp);
sfree(mbmp);
sfree(gbmp);
sprintf(ret, "%s,%s", mbmp, gbmp);
sfree(mbmp);
sfree(gbmp);
+ sfree(matrix);
+ sfree(grid);
return ret;
}
return ret;
}
@@
-731,6
+733,7
@@
static game_state *solve_game(game_state *state, game_state *currstate,
if (equations[j * (wh+1) + wh]) {
*error = "No solution exists for this position";
sfree(equations);
if (equations[j * (wh+1) + wh]) {
*error = "No solution exists for this position";
sfree(equations);
+ sfree(und);
return NULL;
}
break;
return NULL;
}
break;
@@
-852,6
+855,7
@@
static game_state *solve_game(game_state *state, game_state *currstate,
sfree(shortest);
sfree(solution);
sfree(equations);
sfree(shortest);
sfree(solution);
sfree(equations);
+ sfree(und);
return ret;
}
return ret;
}
@@
-1182,7
+1186,7
@@
static int game_timing_state(game_state *state)
#endif
const struct game thegame = {
#endif
const struct game thegame = {
- "Flip",
NULL
,
+ "Flip",
"games.flip"
,
default_params,
game_fetch_preset,
decode_params,
default_params,
game_fetch_preset,
decode_params,