X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=3812a3792c17d068cdb0bccd575e2a3922088f34;hb=cf9bf4e58fba6f478f3263412d224a4499f3fad6;hp=f7ba2067ee509dbb3c5e735b49fe731712152faf;hpb=7c0679ad61d7787dc3a3326551acbdf6658db0b0;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index f7ba2067..3812a379 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -54,7 +54,7 @@ namespace { // The root position. This is set up when the user (or in practice, the GUI) // sends the "position" UCI command. The root position is sent to the think() // function when the program receives the "go" command. - Position RootPosition; + Position RootPosition(StartPosition); // Local functions bool handle_command(const string& command); @@ -210,7 +210,7 @@ namespace { } // Our StateInfo st is about going out of scope so copy // its content inside RootPosition before they disappear. - RootPosition.saveState(); + RootPosition.detach(); } } } @@ -314,7 +314,7 @@ namespace { string token; int depth, tm, n; - Position pos = RootPosition; + Position pos(RootPosition); if (!(uip >> depth)) return;