mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Fix incorrect initialization
Fixes https://github.com/official-stockfish/Stockfish/issues/6505 Missing initialization seemingly resulting in side effects, as discussed in the issue. Credit to Sopel for spotting the bug. PR used as a testcase for CoPilot, doing the right thing https://github.com/official-stockfish/Stockfish/pull/6478#discussion_r2655467218 closes https://github.com/official-stockfish/Stockfish/pull/6511 No functional change
This commit is contained in:
+2
-2
@@ -582,8 +582,8 @@ void Search::Worker::clear() {
|
||||
captureHistory.fill(-689);
|
||||
|
||||
// Each thread is responsible for clearing their part of shared history
|
||||
sharedHistory.correctionHistory.clear_range(0, numaThreadIdx);
|
||||
sharedHistory.pawnHistory.clear_range(-1238, numaThreadIdx);
|
||||
sharedHistory.correctionHistory.clear_range(0, numaThreadIdx, numaTotal);
|
||||
sharedHistory.pawnHistory.clear_range(-1238, numaThreadIdx, numaTotal);
|
||||
|
||||
ttMoveHistory = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user