~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Richard's patch so that it's actually C :-/
[sgt/puzzles]
/
fifteen.c
diff --git
a/fifteen.c
b/fifteen.c
index
4b37dd7
..
bf2cdf1
100644
(file)
--- a/
fifteen.c
+++ b/
fifteen.c
@@
-130,7
+130,7
@@
static game_params *custom_params(config_item *cfg)
static char *validate_params(game_params *params)
{
static char *validate_params(game_params *params)
{
- if (params->w < 2
&&
params->h < 2)
+ if (params->w < 2
||
params->h < 2)
return "Width and height must both be at least two";
return NULL;
return "Width and height must both be at least two";
return NULL;
@@
-374,6
+374,7
@@
static game_state *dup_game(game_state *state)
static void free_game(game_state *state)
{
static void free_game(game_state *state)
{
+ sfree(state->tiles);
sfree(state);
}
sfree(state);
}