aboutsummaryrefslogtreecommitdiff
path: root/loopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'loopy.c')
-rw-r--r--loopy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/loopy.c b/loopy.c
index 81699c2..2c0dbc6 100644
--- a/loopy.c
+++ b/loopy.c
@@ -684,6 +684,7 @@ static game_params *custom_params(const config_item *cfg)
static const char *validate_params(const game_params *params, bool full)
{
+ const char *err;
if (params->type < 0 || params->type >= NUM_GRID_TYPES)
return "Illegal grid type";
if (params->w < grid_size_limits[params->type].amin ||
@@ -692,6 +693,8 @@ static const char *validate_params(const game_params *params, bool full)
if (params->w < grid_size_limits[params->type].omin &&
params->h < grid_size_limits[params->type].omin)
return grid_size_limits[params->type].oerr;
+ err = grid_validate_params(grid_types[params->type], params->w, params->h);
+ if (err != NULL) return err;
/*
* This shouldn't be able to happen at all, since decode_params