X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;fp=src%2Fuci.cpp;h=d0341bd71683a173e8096317cfa1b5e46405bfb4;hp=95f6f349dd3cf4675407ac7ebb54efd32df4464b;hb=282e15bf75bd1142de96306b22424f0cd2bb8dfa;hpb=36db936e769a2e7a95fc4032eec3b79251bbaef5 diff --git a/src/uci.cpp b/src/uci.cpp index 95f6f349..d0341bd7 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -356,9 +356,9 @@ std::string UCI::value(Value v) { if (abs(v) < VALUE_TB_WIN_IN_MAX_PLY) ss << "cp " << UCI::to_cp(v); - else if (abs(v) < VALUE_MATE_IN_MAX_PLY) + else if (abs(v) <= VALUE_TB) { - const int ply = VALUE_MATE_IN_MAX_PLY - 1 - std::abs(v); // recompute ss->ply + const int ply = VALUE_TB - std::abs(v); // recompute ss->ply ss << "cp " << (v > 0 ? 20000 - ply : -20000 + ply); } else