projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5b8ca1e
)
Fix disambiguation bug in move_to_san()
author
Marco Costalba
<mcostalba@gmail.com>
Sun, 4 Dec 2011 11:24:15 +0000 (12:24 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Sun, 4 Dec 2011 11:24:15 +0000 (12:24 +0100)
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>
src/move.cpp
patch
|
blob
|
history
diff --git
a/src/move.cpp
b/src/move.cpp
index
1a312cb
..
d079ee7
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;