]> git.sesse.net Git - stockfish/blobdiff - src/move.cpp
Fix compilation with Android NDK
[stockfish] / src / move.cpp
index f589889b444ca2bc081f69465a59520a2405d44d..7e171f7a6a9bc388d8a7fe4624dd15d9904c9609 100644 (file)
@@ -46,7 +46,7 @@ const string move_to_uci(Move m, bool chess960) {
       to = from + (file_of(to) == FILE_H ? Square(2) : -Square(2));
 
   if (is_promotion(m))
-      promotion = char(tolower(piece_type_to_char(promotion_piece_type(m))));
+      promotion = char(tolower(piece_type_to_char(promotion_type(m))));
 
   return square_to_string(from) + square_to_string(to) + promotion;
 }
@@ -97,7 +97,7 @@ const string move_to_san(Position& pos, Move m) {
 
           // Disambiguation if we have more then one piece with destination 'to'
           // note that for pawns is not needed because starting file is explicit.
-          attackers = pos.attackers_to(to) & pos.pieces(pt, pos.side_to_move());
+          attackers = pos.attackers_to(to) & pos.pieces(pos.side_to_move(), pt);
           attackers ^= from;
           ambiguousMove = ambiguousFile = ambiguousRank = false;
 
@@ -142,7 +142,7 @@ const string move_to_san(Position& pos, Move m) {
       if (is_promotion(m))
       {
           san += '=';
-          san += piece_type_to_char(promotion_piece_type(m));
+          san += piece_type_to_char(promotion_type(m));
       }
   }