]> git.sesse.net Git - stockfish/commitdiff
Be sure to read options before to call trace_evaluate()
authorMarco Costalba <mcostalba@gmail.com>
Tue, 1 Mar 2011 12:32:19 +0000 (13:32 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 1 Mar 2011 12:32:42 +0000 (13:32 +0100)
Otherwise in case we change an option with setoption and
then ask for "eval" command the evaluation is not updated.

Spotted by Justin Blanchard.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/uci.cpp

index bc412012d8f09d7f9e4034f909840d9f71fdd8f9..cec9ccf10d8e40e0d560ad43e0a5030e3eb64310 100644 (file)
@@ -97,7 +97,10 @@ bool execute_uci_command(const string& cmd) {
       pos.print();
 
   else if (token == "eval")
+  {
+      read_evaluation_uci_options(pos.side_to_move());
       cout << trace_evaluate(pos) << endl;
+  }
 
   else if (token == "key")
       cout << "key: " << hex     << pos.get_key()