]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Fix wrong condition in PawnEntry::king_safety()
[stockfish] / src / pawns.cpp
index 6897969cb08398414470f902b839a9e67faec84b..6923d20b31d8bbfdf87ac26c7bd36e3555b032f4 100644 (file)
@@ -260,6 +260,7 @@ template<Color Us>
 Score PawnEntry::update_safety(const Position& pos, Square ksq) {
 
   kingSquares[Us] = ksq;
+  castleRights[Us] = pos.can_castle(Us);
 
   if (relative_rank(Us, ksq) > RANK_4)
       return kingSafety[Us] = SCORE_ZERO;