mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Fix disambiguation bug in move_to_san()
A pinned piece cannot move and so does not play any role in SAN disambiguation. Reported by Steven Edwards. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -106,6 +106,10 @@ const string move_to_san(Position& pos, Move m) {
|
|||||||
{
|
{
|
||||||
sq = pop_1st_bit(&attackers);
|
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))
|
if (file_of(sq) == file_of(from))
|
||||||
ambiguousFile = true;
|
ambiguousFile = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user