X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=6ce3bf8567447fa531861af74ff25fe989ccb284;hp=b03752edc4220e865d4087642e1523e53050d42a;hb=a9e55d43262d11a916bdfa68cd1de0174d884cd3;hpb=8f59de48f559e477dc383d5b51a0b842986758d0 diff --git a/src/uci.cpp b/src/uci.cpp index b03752ed..6ce3bf85 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -22,6 +22,7 @@ //// Includes //// +#include #include #include #include @@ -228,6 +229,9 @@ namespace { if (RootPosition.rule_50_counter() == 0) RootPosition.reset_game_ply(); } + // Our StateInfo st is about going out of scope, + // so save its content before they disappear. + RootPosition.setStartState(st); } } } @@ -321,6 +325,8 @@ namespace { if (moveTime) infinite = true; // HACK + assert(RootPosition.is_ok()); + think(RootPosition, infinite, ponder, RootPosition.side_to_move(), time, inc, movesToGo, depth, nodes, moveTime, searchMoves); }