From e201ec3b7001a2652560bfa845d41abe0bc9f181 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 31 Jul 2025 14:03:02 +0200 Subject: Fix switch logic in coord solver --- src/solvers/coord/solve.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/solvers') diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index 9170cca..2d040de 100644 --- 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; -- cgit v1.3