]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Change color argument of square_is_weak()
[stockfish] / src / position.h
index 8121bec1c9c0642c2e17f2a96b2acbcc9fccc76c..6472d73551c4ac272dfa12ee79d14c9b6681871a 100644 (file)
@@ -483,7 +483,7 @@ inline bool Position::pawn_is_passed(Color c, Square s) const {
 }
 
 inline bool Position::square_is_weak(Square s, Color c) const {
-  return !(pieces(PAWN, c) & outpost_mask(opposite_color(c), s));
+  return !(pieces(PAWN, opposite_color(c)) & outpost_mask(c, s));
 }
 
 inline Key Position::get_key() const {