mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Tighten Bridges' validate_desc()
It allowed V, W, X, Y, H, I, J, and K to appear in game descriptions even though new_game() didn't ascribe any meaning to those letters and would fail an assertion if they ever occurred. As far as I can tell, those letters have never done anything, so I've just removed the checks for them from validate_desc().
This commit is contained in:
@ -2016,11 +2016,6 @@ static const char *validate_desc(const game_params *params, const char *desc)
|
|||||||
i += *desc - 'a'; /* plus the i++ */
|
i += *desc - 'a'; /* plus the i++ */
|
||||||
else if (*desc >= 'A' && *desc <= 'G')
|
else if (*desc >= 'A' && *desc <= 'G')
|
||||||
/* OK */;
|
/* OK */;
|
||||||
else if (*desc == 'V' || *desc == 'W' ||
|
|
||||||
*desc == 'X' || *desc == 'Y' ||
|
|
||||||
*desc == 'H' || *desc == 'I' ||
|
|
||||||
*desc == 'J' || *desc == 'K')
|
|
||||||
/* OK */;
|
|
||||||
else if (!*desc)
|
else if (!*desc)
|
||||||
return "Game description shorter than expected";
|
return "Game description shorter than expected";
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user