aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/map.c b/map.c
index 0478344..2d624b9 100644
--- a/map.c
+++ b/map.c
@@ -255,7 +255,7 @@ static const char *validate_params(const game_params *params, bool full)
{
if (params->w < 2 || params->h < 2)
return "Width and height must be at least two";
- if (params->w > INT_MAX / params->h)
+ if (params->w > INT_MAX / 2 / params->h)
return "Width times height must not be unreasonably large";
if (params->n < 5)
return "Must have at least five regions";