diff options
| author | Simon Tatham <anakin@pobox.com> | 2012-01-23 18:56:04 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2012-01-23 18:56:04 +0000 |
| commit | 5c972e9ebf009a3d03b86fb8434035c0a85f73aa (patch) | |
| tree | ec6d5c81d05dfb959e2f9357d53305d45160ed8b | |
| parent | 5e1c11ab6945cd96a267a8b15f527f80bc0e35f6 (diff) | |
| download | puzzles-5c972e9ebf009a3d03b86fb8434035c0a85f73aa.zip puzzles-5c972e9ebf009a3d03b86fb8434035c0a85f73aa.tar.gz puzzles-5c972e9ebf009a3d03b86fb8434035c0a85f73aa.tar.bz2 puzzles-5c972e9ebf009a3d03b86fb8434035c0a85f73aa.tar.xz | |
Fix default parameter assignment in Light Up when validating an
incomplete parameter string: if the user hand-types a game ID along
the lines of '18x10:stuff', we should not assume SYMM_ROT4 in the
resulting game_params, since it'll be failed by validate_params.
[originally from svn r9386]
| -rw-r--r-- | lightup.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -215,6 +215,11 @@ static void decode_params(game_params *params, char const *string) if (*string == 's') { string++; EATNUM(params->symm); + } else { + /* cope with user input such as '18x10' by ensuring symmetry + * is not selected by default to be incompatible with dimensions */ + if (params->symm == SYMM_ROT4 && params->w != params->h) + params->symm = SYMM_ROT2; } params->difficulty = 0; /* cope with old params */ |