From 8a91354f7b94c669c77fe628a81f9bfe9f599ef0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 14 Oct 2024 00:05:43 +0200 Subject: Interface changes, progress with python --- src/solvers/h48/solve_multithread.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/solvers/h48/solve_multithread.h') diff --git a/src/solvers/h48/solve_multithread.h b/src/solvers/h48/solve_multithread.h index 8e00404..d8c81af 100644 --- a/src/solvers/h48/solve_multithread.h +++ b/src/solvers/h48/solve_multithread.h @@ -36,13 +36,14 @@ solve_h48_appendsolution_thread(dfsarg_solveh48_t *arg, task_queue_t *tq) if (strl < 0) goto solve_h48_appendsolution_thread_error; - *arg->nextsol += strl; - arg->solutions_size -= strl; + *arg->nextsol += strl-1; + arg->solutions_size -= strl-1; if (arg->npremoves) { **arg->nextsol = ' '; (*arg->nextsol)++; + arg->solutions_size--; invertmoves(arg->premoves, arg->npremoves, invertedpremoves); strl = writemoves(invertedpremoves, @@ -50,13 +51,14 @@ solve_h48_appendsolution_thread(dfsarg_solveh48_t *arg, task_queue_t *tq) if (strl < 0) goto solve_h48_appendsolution_thread_error; - *arg->nextsol += strl; - arg->solutions_size -= strl; + *arg->nextsol += strl-1; + arg->solutions_size -= strl-1; } LOG("Solution found: %s\n", solution); **arg->nextsol = '\n'; (*arg->nextsol)++; + arg->solutions_size--; (*arg->nsols)++; solve_h48_appendsolution_thread_error: -- cgit v1.3