]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Revert odd depths razoring
[stockfish] / src / uci.cpp
index 4aade3b66bb99cbcdb261089519443f7c8e48c11..6ce3bf8567447fa531861af74ff25fe989ccb284 100644 (file)
@@ -22,6 +22,7 @@
 //// Includes
 ////
 
+#include <cassert>
 #include <iostream>
 #include <sstream>
 #include <string>
@@ -219,15 +220,18 @@ namespace {
         if (token == "moves")
         {
             Move move;
-            UndoInfo u;
+            StateInfo st;
             while (!uip.eof())
             {
                 uip >> token;
                 move = move_from_string(RootPosition, token);
-                RootPosition.do_move(move, u);
+                RootPosition.do_move(move, st);
                 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);
   }