projects
/
stockfish
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix disambiguation bug in move_to_san()
[stockfish]
/
src
/
move.cpp
diff --git
a/src/move.cpp
b/src/move.cpp
index 1a312cbc90e0e2f5744da9dae64a9e98fa92adf7..d079ee7b56f840b4aaebe61c48066446eb49fe34 100644
(file)
--- a/
src/move.cpp
+++ b/
src/move.cpp
@@
-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;