ref: 15974d06bbaad287382c6eeb8deb7c6f3a627278
parent: 5bd02f982a878312065b4d81d05a90bc41a98c6c
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Jan 9 10:07:24 EST 2023
Towers: reject descriptions with odd characters at the end Towers' new_game() causes an assertion failure on game description strings that contain spurious characters after a valid description, so validate_desc() should also refuse such a description. The problem could be demonstrated by editing the game description in the "Specific" dialogue box to add a '!' at the end, which caused "new_game: Assertion `!*p' failed.".
--- a/towers.c
+++ b/towers.c
@@ -893,6 +893,7 @@
return "Too much data to fit in grid";
}
+ if (*p) return "Rubbish at end of game description";
return NULL;
}