~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetic: fix mismatch between game_compute_size() and game_redraw()
[sgt/puzzles]
/
latin.c
diff --git
a/latin.c
b/latin.c
index
2d6ae74
..
45096e4
100644
(file)
--- a/
latin.c
+++ b/
latin.c
@@
-956,12
+956,12
@@
void latin_solver_debug(unsigned char *cube, int o)
#ifdef STANDALONE_SOLVER
if (solver_show_working) {
struct latin_solver ls, *solver = &ls;
#ifdef STANDALONE_SOLVER
if (solver_show_working) {
struct latin_solver ls, *solver = &ls;
-
unsigned
char *dbg;
+ char *dbg;
int x, y, i, c = 0;
ls.cube = cube; ls.o = o; /* for cube() to work */
int x, y, i, c = 0;
ls.cube = cube; ls.o = o; /* for cube() to work */
- dbg = snewn(3*o*o*o,
unsigned
char);
+ dbg = snewn(3*o*o*o, char);
for (y = 0; y < o; y++) {
for (x = 0; x < o; x++) {
for (i = 1; i <= o; i++) {
for (y = 0; y < o; y++) {
for (x = 0; x < o; x++) {
for (i = 1; i <= o; i++) {
@@
-1176,7
+1176,7
@@
int latin_check(digit *sq, int order)
tree234 *dict = newtree234(latin_check_cmp);
int c, r;
int ret = 0;
tree234 *dict = newtree234(latin_check_cmp);
int c, r;
int ret = 0;
- lcparams *lcp, lc;
+ lcparams *lcp, lc
, *aret
;
/* Use a tree234 as a simple hash table, go through the square
* adding elements as we go or incrementing their counts. */
/* Use a tree234 as a simple hash table, go through the square
* adding elements as we go or incrementing their counts. */
@@
-1188,7
+1188,8
@@
int latin_check(digit *sq, int order)
lcp = snew(lcparams);
lcp->elt = ELT(sq, c, r);
lcp->count = 1;
lcp = snew(lcparams);
lcp->elt = ELT(sq, c, r);
lcp->count = 1;
- assert(add234(dict, lcp) == lcp);
+ aret = add234(dict, lcp);
+ assert(aret == lcp);
} else {
lcp->count++;
}
} else {
lcp->count++;
}