X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=9c13eff7abfdf2ced889d5273c3e1e3651160284;hp=6ce3bf8567447fa531861af74ff25fe989ccb284;hb=2155fb78256204aae5aa80946dfe7d8d9c6e2397;hpb=55f9afee2a079b2dd0b1aeda41082c58eb317ca3 diff --git a/src/uci.cpp b/src/uci.cpp index 6ce3bf85..9c13eff7 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -119,7 +119,6 @@ namespace { if (token == "quit") { - OpeningBook.close(); stop_threads(); quit_eval(); exit(0); @@ -170,7 +169,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 +250,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") {