X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=c9120ddbd7728c1b7dfc72cf6b6930118dc2f594;hp=6ce3bf8567447fa531861af74ff25fe989ccb284;hb=afadc33fb430abd2ba2783a62180cf971b13652f;hpb=55f9afee2a079b2dd0b1aeda41082c58eb317ca3 diff --git a/src/uci.cpp b/src/uci.cpp index 6ce3bf85..c9120ddb 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -170,7 +170,7 @@ namespace { } else if (token == "key") { - std::cout << "key: " << RootPosition.get_key() + std::cout << "key: " << std::hex << RootPosition.get_key() << " material key: " << RootPosition.get_material_key() << " pawn key: " << RootPosition.get_pawn_key() << std::endl; @@ -251,11 +251,13 @@ namespace { if (token == "name") { uip >> name; - uip >> token; - while (!uip.eof() && token != "value") + while (!uip.eof()) { - name += (" " + token); - uip >> token; + uip >> token; + if (token == "value") + break; + + name += (" " + token); } if (token == "value") {