bool ambiguousMove, ambiguousFile, ambiguousRank;
Square sq, from = from_sq(m);
Square to = to_sq(m);
- PieceType pt = type_of(pos.piece_on(from));
+ PieceType pt = type_of(pos.piece_moved(m));
string san;
if (is_castle(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());
- xor_bit(&attackers, from);
+ attackers ^= from;
ambiguousMove = ambiguousFile = ambiguousRank = false;
while (attackers)