From c1f4000426dd799cfac97298c539e618909c057f Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 25 Oct 2012 00:07:16 +0200 Subject: [PATCH] Fix an assert when we stop the search MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When signal 'stop' is raised we return bestValue that could be still set at -VALUE_INFINITE and this triggers an assert. Fix it by returning a value we know for sure is not +-VALUE_INFINITE. Reported by 平岡拓也 Hiraoka. No functional change. --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index b43ebd02..4ac94402 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -958,7 +958,7 @@ split_point_start: // At split points actual search starts from here // ran out of time. In this case, the return value of the search cannot // be trusted, and we don't update the best move and/or PV. if (Signals.stop || thisThread->cutoff_occurred()) - return bestValue; + return value; // To avoid returning VALUE_INFINITE if (RootNode) { -- 2.39.2