X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=61b164b89fa3d60155260ae60f9fca5f69a7f1f4;hp=65bfa25807f4eb2af0ac95a3565f589ae18c5ec5;hb=6176357ac18dcc2f0dd12c17d5ac654c86a32009;hpb=46bb6c6dc300bc5a8b819d690734ddcb1f1e4e14 diff --git a/src/position.h b/src/position.h index 65bfa258..61b164b8 100644 --- a/src/position.h +++ b/src/position.h @@ -722,10 +722,7 @@ inline bool Position::move_is_capture(Move m) const { // Move must not be MOVE_NONE ! - return ( !square_is_empty(move_to(m)) - && (color_of_piece_on(move_to(m)) != color_of_piece_on(move_from(m))) - ) - || move_is_ep(m); + return (!square_is_empty(move_to(m)) && !move_is_castle(m)) || move_is_ep(m); } #endif // !defined(POSITION_H_INCLUDED)