]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Don't set Search::RootColor in Eval::trace
[stockfish] / src / uci.cpp
index 95d050f3bcaa66b624f159bc144ebfd4cf974f18..395b78a813bf4e9342a14ba44f7ef78e3ba9f6aa 100644 (file)
@@ -103,6 +103,11 @@ void UCI::loop(const string& args) {
                     << "\n"       << Options
                     << "\nuciok"  << sync_endl;
 
+      else if (token == "eval")
+      {
+          Search::RootColor = pos.side_to_move(); // Ensure it is set
+          sync_cout << Eval::trace(pos) << sync_endl;
+      }
       else if (token == "ucinewgame") TT.clear();
       else if (token == "go")         go(pos, is);
       else if (token == "position")   position(pos, is);
@@ -111,7 +116,6 @@ void UCI::loop(const string& args) {
       else if (token == "bench")      benchmark(pos, is);
       else if (token == "d")          sync_cout << pos.pretty() << sync_endl;
       else if (token == "isready")    sync_cout << "readyok" << sync_endl;
-      else if (token == "eval")       sync_cout << Eval::trace(pos) << sync_endl;
       else
           sync_cout << "Unknown command: " << cmd << sync_endl;