]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Merge branch 'master' of ssh://free2.projectlocker.com/sf
[stockfish] / src / search.cpp
index 5d2e5175b052bdc35fc5019bdf45dfa39bbd9860..df74d580ec2b954cd346b310438a976b9819bbca 100644 (file)
@@ -442,6 +442,10 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
   {
       ActiveThreads = newActiveThreads;
       init_eval(ActiveThreads);
+      // HACK: init_eval() destroys the static castleRightsMask[] array in the
+      // Position class. The below line repairs the damage.
+      Position p(pos.to_fen());
+      assert(pos.is_ok());
   }
 
   // Wake up sleeping threads