mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 13:17:44 +00:00
Fix brekage from previous patches
It is interesting the fact that we need to test for move_is_castle(m) anyway and not relying on testing if destination square is attacked. Indeed the latter condition fails if the castling rook is attacked, castling is coded as "king captures the rook" but it is legal in that case. Verified no functional change with beginning of the series. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+1
-1
@@ -526,7 +526,7 @@ inline bool Position::is_chess960() const {
|
||||
inline bool Position::move_is_capture(Move m) const {
|
||||
|
||||
assert (m != MOVE_NONE && m != MOVE_NULL);
|
||||
return !square_is_empty(move_to(m)) || move_is_ep(m);
|
||||
return !move_is_special(m) ? !square_is_empty(move_to(m)) : move_is_ep(m);
|
||||
}
|
||||
|
||||
inline PieceType Position::captured_piece_type() const {
|
||||
|
||||
Reference in New Issue
Block a user