X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmove.cpp;h=d079ee7b56f840b4aaebe61c48066446eb49fe34;hp=b019110b974f044db3f08bb262e6ead65c711d99;hb=11a79809767e60897e0b015651db30ce1d36b69a;hpb=3141490374182551ed26f39ba4e3efb59589f057 diff --git a/src/move.cpp b/src/move.cpp index b019110b..d079ee7b 100644 --- a/src/move.cpp +++ b/src/move.cpp @@ -21,7 +21,6 @@ #include #include -#include "move.h" #include "movegen.h" #include "position.h" @@ -107,6 +106,10 @@ const string move_to_san(Position& pos, Move m) { { sq = pop_1st_bit(&attackers); + // Pinned pieces are not included in the possible sub-set + if (!pos.pl_move_is_legal(make_move(sq, to), pos.pinned_pieces())) + continue; + if (file_of(sq) == file_of(from)) ambiguousFile = true;