mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Fix a crash when reaching PLY_MAX in a check position
In this case we call evaluate() being in check and this is not allowed. Bug found testing with reduced PLY_MAX value as suggested by Miguel A. Ballicora on talkchess. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -309,6 +309,7 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) {
|
||||
|
||||
assert(pos.is_ok());
|
||||
assert(threadID >= 0 && threadID < THREAD_MAX);
|
||||
assert(!pos.is_check());
|
||||
|
||||
memset(&ei, 0, sizeof(EvalInfo));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user