diff options
| author | Franklin Wei <me@fwei.tk> | 2017-08-14 17:22:59 -0400 |
|---|---|---|
| committer | Franklin Wei <franklin@rockbox.org> | 2020-12-07 19:27:19 -0500 |
| commit | 4ffcd5dc8b0adf017148c5a88193a8562616303d (patch) | |
| tree | e1f784e07f9e191d640437fa484d9e0fedac3ae4 /pattern.c | |
| parent | 6752afa4968826f10b2755d318fd873228ec670d (diff) | |
| download | puzzles-4ffcd5dc8b0adf017148c5a88193a8562616303d.zip puzzles-4ffcd5dc8b0adf017148c5a88193a8562616303d.tar.gz puzzles-4ffcd5dc8b0adf017148c5a88193a8562616303d.tar.bz2 puzzles-4ffcd5dc8b0adf017148c5a88193a8562616303d.tar.xz | |
Add more config validity checks
Diffstat (limited to 'pattern.c')
| -rw-r--r-- | pattern.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -176,6 +176,8 @@ static const char *validate_params(const game_params *params, bool full) { if (params->w <= 0 || params->h <= 0) return "Width and height must both be greater than zero"; + if (params->w * params->w < 2) + return "Grid must contain at least two squares"; return NULL; } |