X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=063233111dea59066bffb702c3597ec31ca7b87f;hp=1081e1da9e723e1e4834fa23ce0f8437f8b4c09c;hb=7b05b83bf2f69b1fac0271acd28b2382253f2e37;hpb=683595fee15a1d8ceeb1bbd577d96ed9c0f8aaaa diff --git a/src/position.cpp b/src/position.cpp index 1081e1da..06323311 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -867,8 +867,6 @@ void Position::do_capture_move(PieceType capture, Color them, Square to) { st->mgValue -= pst(them, capture, to); st->egValue -= pst(them, capture, to); - assert(!move_promotion(m) || capture != PAWN); - // Update material if (capture != PAWN) npMaterial[them] -= piece_value_midgame(capture); @@ -1618,7 +1616,7 @@ int Position::see(Square from, Square to) const { // Remove the attacker we just found from the 'attackers' bitboard, // and scan for new X-ray attacks behind the attacker. b = attackers & pieces_of_color_and_type(c, pt); - occ ^= (b & -b); + occ ^= (b & (~b + 1)); attackers |= (rook_attacks_bb(to, occ) & rooks_and_queens()) | (bishop_attacks_bb(to, occ) & bishops_and_queens());