chiark / gitweb /
Group: fix assertion failure in Unreasonable generation.
authorSimon Tatham <anakin@pobox.com>
Tue, 9 Jun 2020 13:22:31 +0000 (14:22 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 9 Jun 2020 13:38:33 +0000 (14:38 +0100)
Generating the game id 6dui#12345 would cause an assertion failure in
a call to latin_solver_place that should never have happened in the
first place, because the "return -1" that ought to have prevented it
was accidentally inside #ifdef STANDALONE_SOLVER.

unfinished/group.c

index 7acadac57cd19109252f60374a14f21fd787d45a..006a9e0ee603424cf21bb01107f6802843fdf5f2 100644 (file)
@@ -404,8 +404,8 @@ static int solver_normal(struct latin_solver *solver, void *vctx)
                                    solver_recurse_depth*4, "",
                                    names[j-1], i, j);
                         }
-                        return -1;
 #endif
+                        return -1;
                     }
 #ifdef STANDALONE_SOLVER
                     if (solver_show_working) {
@@ -425,8 +425,8 @@ static int solver_normal(struct latin_solver *solver, void *vctx)
                                    solver_recurse_depth*4, "",
                                    names[j-1], j, i);
                         }
-                        return -1;
 #endif
+                        return -1;
                     }
 #ifdef STANDALONE_SOLVER
                     if (solver_show_working) {