X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/26dac64940f6186417944a9ec05b48dc2dee5238..68b183b5bab0947e931246a6c9a245151f862f4e:/tents.c?ds=sidebyside diff --git a/tents.c b/tents.c index 134d44b..2c8b042 100644 --- a/tents.c +++ b/tents.c @@ -1210,6 +1210,10 @@ static char *validate_desc(game_params *params, char *desc) desc++; } + if (area < w * h + 1) + return "Not enough data to fill grid"; + else if (area > w * h + 1) + return "Too much data to fill grid"; for (i = 0; i < w+h; i++) { if (!*desc)