diff --git a/src/movepick.h b/src/movepick.h index 922a9069b..5b3190594 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -66,7 +66,7 @@ class MovePicker { const PieceToHistory** continuationHistory; const PawnHistory* pawnHistory; Move ttMove; - ExtMove * cur, *endCur, *endBadCaptures, *endCaptures, *endGenerated = moves; + ExtMove * cur, *endCur, *endBadCaptures, *endCaptures, *endGenerated; int stage; int threshold; Depth depth; diff --git a/src/search.cpp b/src/search.cpp index e7c5e6ac1..de2ab7a3e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1053,10 +1053,7 @@ moves_loop: // When in check, search starts here if (!pos.see_ge(move, -margin)) { bool mayStalemateTrap = - depth > 2 && alpha < 0 && pos.non_pawn_material(us) == PieceValue[movedPiece] - && PieceValue[movedPiece] >= RookValue - // it can't be stalemate if we moved a piece adjacent to the king - && !(attacks_bb(pos.square(us)) & move.from_sq()); + depth > 2 && alpha < 0 && pos.non_pawn_material(us) == PieceValue[movedPiece]; // avoid pruning sacrifices of our last piece for stalemate if (!mayStalemateTrap)