aboutsummaryrefslogtreecommitdiff
path: root/fifteen.c
diff options
context:
space:
mode:
Diffstat (limited to 'fifteen.c')
-rw-r--r--fifteen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fifteen.c b/fifteen.c
index 4b37dd7..bf2cdf1 100644
--- 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)
{
- 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;
@@ -374,6 +374,7 @@ static game_state *dup_game(game_state *state)
static void free_game(game_state *state)
{
+ sfree(state->tiles);
sfree(state);
}