X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/fb99a391331f49544b2842f6babd34f18a645e40..f04d88ba2c57c09a2e2598558ff1a42a7d86cfde:/unequal.c diff --git a/unequal.c b/unequal.c index 57d8afc..f21f579 100644 --- a/unequal.c +++ b/unequal.c @@ -98,10 +98,9 @@ struct game_state { #define TITLE(upper,title,func,lower) #title, #define ENCODE(upper,title,func,lower) #lower #define CONFIG(upper,title,func,lower) ":" #title -enum { DIFFLIST(ENUM) DIFF_IMPOSSIBLE = diff_impossible, DIFF_AMBIGUOUS = diff_ambiguous, DIFF_UNFINISHED = diff_unfinished }; +enum { DIFFLIST(ENUM) DIFFCOUNT, DIFF_IMPOSSIBLE = diff_impossible, DIFF_AMBIGUOUS = diff_ambiguous, DIFF_UNFINISHED = diff_unfinished }; static char const *const unequal_diffnames[] = { DIFFLIST(TITLE) }; static char const unequal_diffchars[] = DIFFLIST(ENCODE); -#define DIFFCOUNT lenof(unequal_diffchars) #define DIFFCONFIG DIFFLIST(CONFIG) #define DEFAULT_PRESET 0 @@ -1310,7 +1309,7 @@ static char *solve_game(game_state *state, game_state *currstate, if (!(solved->flags[r] & F_IMMUTABLE)) solved->nums[r] = 0; } - r = solver_state(solved, DIFFCOUNT); + r = solver_state(solved, DIFFCOUNT-1); /* always use full solver */ if (r > 0) ret = latin_desc(solved->nums, solved->order); free_game(solved); return ret;