X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=2a95234585f7c60579d2aaec468906a2c7d12832;hb=72ecd9e20dae465684ae76489f875e7c69d4ab4a;hp=65bfa25807f4eb2af0ac95a3565f589ae18c5ec5;hpb=b35e59355134e34b00108c2ad58ea46df60eb301;p=stockfish diff --git a/src/position.h b/src/position.h index 65bfa258..2a952345 100644 --- a/src/position.h +++ b/src/position.h @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008 Marco Costalba + Copyright (C) 2008-2009 Marco Costalba Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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)