X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=71b974b677d893f3325734f0de639de984c9e2b5;hb=1588a4e84695e48e47c5c8b83d14ead285530c45;hp=65c29bf3741a395f90ba2b703b9a01b4255c3865;hpb=3975a2b94f00dc9f3ead1589436256a39120368a;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 65c29bf3..71b974b6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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