mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00: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:
parent
5b8ca1eee7
commit
11a7980976
1 changed files with 4 additions and 0 deletions
|
@ -106,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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue