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