diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-01-10 00:32:25 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-01-15 16:24:27 +0000 |
| commit | b090c82df1527dcf348c96765f10ab5736c68c29 (patch) | |
| tree | a78e40c1e52399825efb04dad841c93c1bf81efb | |
| parent | 6e40605f1ed4ecce400faae5b41c03995e7f862c (diff) | |
| download | puzzles-b090c82df1527dcf348c96765f10ab5736c68c29.zip puzzles-b090c82df1527dcf348c96765f10ab5736c68c29.tar.gz puzzles-b090c82df1527dcf348c96765f10ab5736c68c29.tar.bz2 puzzles-b090c82df1527dcf348c96765f10ab5736c68c29.tar.xz | |
Also limit Pegs to at least 1x1 even when not doing full validation
| -rw-r--r-- | pegs.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -183,6 +183,8 @@ static const char *validate_params(const game_params *params, bool full) { if (full && (params->w <= 3 || params->h <= 3)) return "Width and height must both be greater than three"; + if (params->w < 1 || params->h < 1) + return "Width and height must both be at least one"; if (params->w > INT_MAX / params->h) return "Width times height must not be unreasonably large"; |