ref: ba944f9f95238d0b820e63d9b6c2d83efc09b8a2
parent: 8a06ff26fc6abd77a4b4a08b839943f588d92dcf
author: Ben Harris <[email protected]>
date: Sun Jan 8 05:42:45 EST 2023
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().
--- a/bridges.c
+++ b/bridges.c
@@ -2016,11 +2016,6 @@
i += *desc - 'a'; /* plus the i++ */
else if (*desc >= 'A' && *desc <= 'G')
/* OK */;
- else if (*desc == 'V' || *desc == 'W' ||
- *desc == 'X' || *desc == 'Y' ||
- *desc == 'H' || *desc == 'I' ||
- *desc == 'J' || *desc == 'K')
- /* OK */;
else if (!*desc)
return "Game description shorter than expected";
else