X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=8d6ddb8d33708c7443c6c8fb8b8a02d893c21b2a;hp=64acc3a89b640231155f13f0ccdaad796a19361d;hb=0ff3bf34cda9479d6c0d40d11ed0496329462edf;hpb=66d165921d32058853830891db8ac60fedc46bd4 diff --git a/src/search.cpp b/src/search.cpp index 64acc3a8..8d6ddb8d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -748,6 +748,11 @@ namespace { << " hashfull " << TT.full() << std::endl; // Print the best move and the ponder move to the standard output + if (ss[0].pv[0] == MOVE_NONE) + { + ss[0].pv[0] = rml.get_move(0); + ss[0].pv[1] = MOVE_NONE; + } std::cout << "bestmove " << ss[0].pv[0]; if (ss[0].pv[1] != MOVE_NONE) std::cout << " ponder " << ss[0].pv[1]; @@ -1389,6 +1394,9 @@ namespace { } TT.store(pos, value_to_tt(bestValue, ply), depth, m, VALUE_TYPE_LOWER); } + + assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE); + return bestValue; }