aboutsummaryrefslogtreecommitdiff
path: root/mosaic.c
diff options
context:
space:
mode:
Diffstat (limited to 'mosaic.c')
-rw-r--r--mosaic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mosaic.c b/mosaic.c
index d07859a..4db960a 100644
--- a/mosaic.c
+++ b/mosaic.c
@@ -840,7 +840,8 @@ static const char *validate_desc(const game_params *params,
while (*curr_desc != '\0') {
if (*curr_desc >= 'a' && *curr_desc <= 'z') {
length += *curr_desc - 'a';
- }
+ } else if (*curr_desc < '0' || *curr_desc >= '9')
+ return "Invalid character in game description";
length++;
curr_desc++;
}