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:
Marco Costalba
2009-10-12 15:19:29 +01:00
parent 181d34e5a0
commit d8e7ce1863
2 changed files with 5 additions and 4 deletions

View File

@@ -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));