ref: 916ad912980d1890c98c3d1d7576b57a017b71bf
parent: 9c54e18f0bcfa9749b433e4a13bcd88c75a997e5
author: Simon Tatham <anakin@pobox.com>
date: Mon May 23 07:13:39 EDT 2005
The GTK `--generate' option didn't validate the game parameters. It does now. [originally from svn r5836]
--- a/gtk.c
+++ b/gtk.c
@@ -1280,7 +1280,10 @@
if ( (seed = strchr(params, '#')) != NULL )
*seed++ = '\0';
thegame.decode_params(par, params);
- } else {
+ }
+ if ((error = thegame.validate_params(par)) != NULL) {
+ fprintf(stderr, "%s: %s\n", pname, error);
+ return 1;
}
parstr = thegame.encode_params(par, FALSE);