mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Partial revert of "Assorted trivial cleanups 5/2019".
Since root_probe() and root_probe_wdl() do not reset all tbRank values if they fail, it is necessary to do this in rank_root_move(). This fixes issue #2196. Alternatively, the loop could be moved into both root_probe() and root_probe_wdl(). No functional change
This commit is contained in:
parent
46ce245763
commit
466daf6fba
1 changed files with 6 additions and 0 deletions
|
@ -1713,4 +1713,10 @@ void Tablebases::rank_root_moves(Position& pos, Search::RootMoves& rootMoves) {
|
||||||
if (dtz_available || rootMoves[0].tbScore <= VALUE_DRAW)
|
if (dtz_available || rootMoves[0].tbScore <= VALUE_DRAW)
|
||||||
Cardinality = 0;
|
Cardinality = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Clean up if root_probe() and root_probe_wdl() have failed
|
||||||
|
for (auto& m : rootMoves)
|
||||||
|
m.tbRank = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue