mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
Fix incorrect early exit in evaluate_leaf.
This commit is contained in:
@@ -702,12 +702,13 @@ namespace Learner
|
||||
|
||||
// Reach leaf
|
||||
Value v;
|
||||
if (pos.checkers()) {
|
||||
if (pos.checkers())
|
||||
{
|
||||
// Sometime a king is checked. An example is a case that a checkmate is
|
||||
// found in the search. If Eval::evaluate() is called whne a king is
|
||||
// checked, classic eval crashes by an assertion. To avoid crashes, return
|
||||
// VALUE_NONE and let the caller assign a value to the position.
|
||||
return VALUE_NONE;
|
||||
v = VALUE_NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user