commit e201ec3b7001a2652560bfa845d41abe0bc9f181
parent 474039de7af2cee7fa309e06a5c4e75b81f220ad
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Thu, 31 Jul 2025 14:03:02 +0200
Fix switch logic in coord solver
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h
@@ -90,6 +90,10 @@ coord_continue_onnormal(const dfsarg_solve_coord_t arg[static 1])
/* Check that we have enough moves left to switch */
return flag & NISSY_NISSFLAG_NORMAL || nn < swbound_n;
} else {
+ /* Don't switch if not allowed */
+ if (!(flag & NISSY_NISSFLAG_MIXED))
+ return false;
+
/* Forbid switching multiple times */
if (nn > 0)
return false;
@@ -131,6 +135,10 @@ coord_continue_oninverse(const dfsarg_solve_coord_t arg[static 1])
/* Check that we have enough moves left to switch */
return flag & NISSY_NISSFLAG_INVERSE || ni < swbound_i;
} else {
+ /* Don't switch if not allowed */
+ if (!(flag & NISSY_NISSFLAG_MIXED))
+ return false;
+
/* Forbid switching multiple times */
if (ni > 0)
return false;