]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Allow Position::init() to be called more than once
[stockfish] / src / position.cpp
index 15ccb4835dbea166a6ae267d30e27056893734ac..5a98821d493dde10d9fe2bd020ba17467c1d7ea5 100644 (file)
@@ -149,6 +149,7 @@ void Position::init() {
 
   for (int cr = NO_CASTLING; cr <= ANY_CASTLING; ++cr)
   {
 
   for (int cr = NO_CASTLING; cr <= ANY_CASTLING; ++cr)
   {
+      Zobrist::castling[cr] = 0;
       Bitboard b = cr;
       while (b)
       {
       Bitboard b = cr;
       while (b)
       {