Validation of random-state-type game descriptions was broken. This

meant that a Mines game saved before the first click had taken place
could not be successfully reloaded.

[originally from svn r6036]
This commit is contained in:
Simon Tatham
2005-06-29 12:19:08 +00:00
parent 238a6d08fe
commit 074f11edc4

View File

@ -1990,6 +1990,7 @@ static char *validate_desc(game_params *params, char *desc)
int x, y; int x, y;
if (*desc == 'r') { if (*desc == 'r') {
desc++;
if (!*desc || !isdigit((unsigned char)*desc)) if (!*desc || !isdigit((unsigned char)*desc))
return "No initial mine count in game description"; return "No initial mine count in game description";
while (*desc && isdigit((unsigned char)*desc)) while (*desc && isdigit((unsigned char)*desc))