X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=0e249705fa59a89e00d1f689d714bf33bbe024f9;hp=355eed1b24ca79327194aaf8f90ab4f549e57cec;hb=2bb555025fc94fde3972b644bdbd27f245475213;hpb=3201a434603b0cd6707391c9026f31a519d46dc0 diff --git a/src/search.cpp b/src/search.cpp index 355eed1b..0e249705 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -513,6 +513,9 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[ << move_to_san(pos, ponderMove) // Works also with MOVE_NONE << endl; + // Return from think() with unchanged position + pos.undo_move(bestMove); + LogFile.close(); } @@ -903,7 +906,7 @@ namespace { // Write PV lines to transposition table, in case the relevant entries // have been overwritten during the search. - for (int i = 0; i < MultiPV; i++) + for (int i = 0; i < Min(MultiPV, (int)rml.size()); i++) rml[i].insert_pv_in_tt(pos); return alpha;