~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix default parameter assignment in Light Up when validating an
[sgt/puzzles]
/
lightup.c
diff --git
a/lightup.c
b/lightup.c
index
5fe95b0
..
3747ec1
100644
(file)
--- a/
lightup.c
+++ b/
lightup.c
@@
-215,6
+215,11
@@
static void decode_params(game_params *params, char const *string)
if (*string == 's') {
string++;
EATNUM(params->symm);
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 */
}
params->difficulty = 0;
/* cope with old params */