From ae3a39cf0414e354151c04307d06141c8011e3b8 Mon Sep 17 00:00:00 2001 From: rektdie Date: Thu, 1 Oct 2026 05:40:07 +0200 Subject: [PATCH] check for stop before writing into qs tt (cutnode) | bench 1402552 --- source/search.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/search.cpp b/source/search.cpp index ff682ee..ebd61cb 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -374,6 +374,7 @@ static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, Sear int score = -Quiescence(copy, -beta, -alpha, ply + 1, ctx).score; if (score >= beta) { + if (searchStopped.load(std::memory_order_relaxed)) return 0; ctx->TT->WriteEntry(board.hashKey, 0, score, CutNode, currMove, ttpv); return score; } -- 2.47.3