]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Assorted trivial cleanups 3/2019 (#2030)
[stockfish] / src / position.h
index ce13017dd0e5ab4389f2ba19d7d86c96b0a38871..03c00148a084636fbeac4370f55635890ec0c46f 100644 (file)
@@ -413,7 +413,7 @@ inline void Position::move_piece(Piece pc, Square from, Square to) {
 
   // index[from] is not updated and becomes stale. This works as long as index[]
   // is accessed just by known occupied squares.
-  Bitboard fromTo = square_bb(from) ^ square_bb(to);
+  Bitboard fromTo = square_bb(from) | square_bb(to);
   byTypeBB[ALL_PIECES] ^= fromTo;
   byTypeBB[type_of(pc)] ^= fromTo;
   byColorBB[color_of(pc)] ^= fromTo;