X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=437eb4a258cf50fb36c14e9fbd3bd0784d63a5dc;hb=dcbb05ef39a07798ef82ae00b055650835e0842f;hp=b9d7f968f9fa6cf46fe4042d7afa48d184a6a700;hpb=007613cb5e665c19368ab0cc2ad8bc45e3c16ad4;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index b9d7f968..437eb4a2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -775,6 +775,7 @@ namespace { Depth rdepth = depth - ONE_PLY - 3 * ONE_PLY; assert(rdepth >= ONE_PLY); + assert((ss-1)->currentMove != MOVE_NONE); MovePicker mp(pos, ttMove, H, pos.captured_piece_type()); CheckInfo ci(pos); @@ -782,6 +783,7 @@ namespace { while ((move = mp.next_move()) != MOVE_NONE) if (pos.pl_move_is_legal(move, ci.pinned)) { + ss->currentMove = move; pos.do_move(move, st, ci, pos.move_gives_check(move, ci)); value = -search(pos, ss+1, -rbeta, -rbeta+1, rdepth); pos.undo_move(move);