aboutsummaryrefslogtreecommitdiff
path: root/solo.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-07-16 20:02:15 +0000
committerSimon Tatham <anakin@pobox.com>2005-07-16 20:02:15 +0000
commite7d6c0aa330f4801d66bef6e048307982ee60614 (patch)
tree3b1688e6ebf0e3c639e7df6cb1ab33338619b251 /solo.c
parenta8a903db475885c719bb242b669a2675e702ea68 (diff)
downloadpuzzles-e7d6c0aa330f4801d66bef6e048307982ee60614.zip
puzzles-e7d6c0aa330f4801d66bef6e048307982ee60614.tar.gz
puzzles-e7d6c0aa330f4801d66bef6e048307982ee60614.tar.bz2
puzzles-e7d6c0aa330f4801d66bef6e048307982ee60614.tar.xz
Sanity-checking patch from Phil Bordelon: since Solo can't cope with
more than 36 distinct symbols (it runs out of alphanumerics), check this in validate_params. I hate to do this, since I like puzzle sizes to at least be open-ended in _principle_, but in this case there's a fundamental UI limitation which won't be fixed by getting a faster CPU. [originally from svn r6098]
Diffstat (limited to 'solo.c')
-rw-r--r--solo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/solo.c b/solo.c
index e598fc0..f8d8d6b 100644
--- a/solo.c
+++ b/solo.c
@@ -327,6 +327,8 @@ static char *validate_params(game_params *params, int full)
return "Both dimensions must be at least 2";
if (params->c > ORDER_MAX || params->r > ORDER_MAX)
return "Dimensions greater than "STR(ORDER_MAX)" are not supported";
+ if ((params->c * params->r) > 36)
+ return "Unable to support more than 36 distinct symbols in a puzzle";
return NULL;
}