From dc0c9dbf405095a6483705b153f4c85c64499d4e Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Sat, 22 Aug 2026 15:27:59 -0700 Subject: Bug fixes. --- src/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/search.c') diff --git a/src/search.c b/src/search.c index 3b8000c..28f6f3d 100755 --- a/src/search.c +++ b/src/search.c @@ -163,6 +163,7 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, ASSERT(IS_VALID_FLAG(pf->fVerifyNullmove)); memcpy(&pi->sPosition, pos, sizeof(POSITION)); #endif + mvBest.uMove = 0; // Jump directly to Qsearch if remaining depth is low enough. // This is the only place Qsearch is entered. @@ -334,7 +335,6 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, // Also clear the avoid null bit in the search flags -- we were // either told to avoid it or not but there is no need to avoid it // for the rest of the line... - mvBest.uMove = 0; pf->fAvoidNullmove = FALSE; do { @@ -1071,6 +1071,7 @@ QSearchInDangerNoStandPat(IN SEARCHER_THREAD_CONTEXT *ctx, -iAlpha); pf->uQsearchDepth--; UnmakeMove(ctx, mv); + if (WE_SHOULD_STOP_SEARCHING) goto end; if (iScore > iBestScore) { @@ -1092,7 +1093,6 @@ QSearchInDangerNoStandPat(IN SEARCHER_THREAD_CONTEXT *ctx, } } } - if (WE_SHOULD_STOP_SEARCHING) goto end; } } ASSERT(SanityCheckMoves(ctx, x, VERIFY_BEFORE)); -- cgit v1.3