]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Small cleanups
[stockfish] / src / position.cpp
index 6bbb7914ae805e2a6302c0fa6106c9f0f923f483..40ebb959575fd457985b19554b8bd988bc77bc6d 100644 (file)
@@ -306,7 +306,7 @@ void Position::set_castling_right(Color c, Square rfrom) {
   Square rto = relative_square(c, cr & KING_SIDE ? SQ_F1 : SQ_D1);
 
   castlingPath[cr] =   (between_bb(rfrom, rto) | between_bb(kfrom, kto) | rto | kto)
-                    & ~(square_bb(kfrom) | rfrom);
+                    & ~(kfrom | rfrom);
 }