X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmove.cpp;h=d09c3052c7c981c6eeca55b01bb491e7ee8f627c;hp=2de102dff058e8af955d205cade269f04e485776;hb=dfcfed6432a2e4cb315c87a84081e599a32b93cc;hpb=bb751d6c890f5c50c642366d601740366cfae8d0 diff --git a/src/move.cpp b/src/move.cpp index 2de102df..d09c3052 100644 --- a/src/move.cpp +++ b/src/move.cpp @@ -81,9 +81,9 @@ Move move_from_string(const Position &pos, const std::string &str) { SquareDelta delta = (to > from)? DELTA_E : DELTA_W; Square s; for(s = from + delta; - pawn_rank(us, s) == RANK_1 && pos.piece_on(s) != rook_of_color(us); + relative_rank(us, s) == RANK_1 && pos.piece_on(s) != rook_of_color(us); s += delta); - if(pawn_rank(us, s) == RANK_1 && pos.piece_on(s) == rook_of_color(us)) + if(relative_rank(us, s) == RANK_1 && pos.piece_on(s) == rook_of_color(us)) return make_castle_move(from, s); } }