X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=48459757dda217aaf117fc5fbc60211722555488;hp=b03752edc4220e865d4087642e1523e53050d42a;hb=72c7595f8ac72c7831ee319b8b0bc46404c5fc27;hpb=8f59de48f559e477dc383d5b51a0b842986758d0 diff --git a/src/uci.cpp b/src/uci.cpp index b03752ed..48459757 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -22,6 +22,7 @@ //// Includes //// +#include #include #include #include @@ -169,7 +170,7 @@ namespace { } else if (token == "key") { - std::cout << "key: " << RootPosition.get_key() + std::cout << "key: " << std::hex << RootPosition.get_key() << " material key: " << RootPosition.get_material_key() << " pawn key: " << RootPosition.get_pawn_key() << std::endl; @@ -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); }