X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnotation.cpp;h=bb4a713cc2e563752bf17cefd57720b121de6430;hb=ea6c1f7a17572f1cd291ffd00e28cfbd3b2947d5;hp=15661eec725ab7c7b788f51cc825cb9e201a57f1;hpb=cd80762c13961eb8fe0a89c0bb19d58e2808a1cf;p=stockfish diff --git a/src/notation.cpp b/src/notation.cpp index 15661eec..bb4a713c 100644 --- a/src/notation.cpp +++ b/src/notation.cpp @@ -108,7 +108,7 @@ const string move_to_san(Position& pos, Move m) { if (m == MOVE_NULL) return "(null)"; - assert(pos.move_is_legal(m)); + assert(MoveList(pos).contains(m)); Bitboard attackers; bool ambiguousMove, ambiguousFile, ambiguousRank; @@ -137,7 +137,7 @@ const string move_to_san(Position& pos, Move m) { { Square sq = pop_lsb(&attackers); - // Pinned pieces are not included in the possible sub-set + // If the move is illegal, the piece is not included in the sub-set if (!pos.pl_move_is_legal(make_move(sq, to), pos.pinned_pieces())) continue;