mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Gary Wong observes that solo's decode_params() is overenthusiastic
about eating the letter `d' (for `diagonal') when it appears in a symmtery description: it should only be used after `m', because mirror symmetry is the only type that can be diagonal. This was causing parsing of the parameter description `3x3adu' to produce the wrong answer: the d would be swallowed, then the u ignored for being incomprehensible, and you'd get default Trivial difficulty. [originally from svn r7386]
This commit is contained in:
2
solo.c
2
solo.c
@ -207,7 +207,7 @@ static void decode_params(game_params *ret, char const *string)
|
|||||||
if (*string == 'r' || *string == 'm' || *string == 'a') {
|
if (*string == 'r' || *string == 'm' || *string == 'a') {
|
||||||
int sn, sc, sd;
|
int sn, sc, sd;
|
||||||
sc = *string++;
|
sc = *string++;
|
||||||
if (*string == 'd') {
|
if (sc == 'm' && *string == 'd') {
|
||||||
sd = TRUE;
|
sd = TRUE;
|
||||||
string++;
|
string++;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user