mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Add a couple of missing checks in validate_desc(), without which
bogus game IDs were getting as far as new_game() and failing assertions. [originally from svn r8655]
This commit is contained in:
4
tents.c
4
tents.c
@ -1210,6 +1210,10 @@ static char *validate_desc(game_params *params, char *desc)
|
|||||||
|
|
||||||
desc++;
|
desc++;
|
||||||
}
|
}
|
||||||
|
if (area < w * h + 1)
|
||||||
|
return "Not enough data to fill grid";
|
||||||
|
else if (area > w * h + 1)
|
||||||
|
return "Too much data to fill grid";
|
||||||
|
|
||||||
for (i = 0; i < w+h; i++) {
|
for (i = 0; i < w+h; i++) {
|
||||||
if (!*desc)
|
if (!*desc)
|
||||||
|
Reference in New Issue
Block a user