diff --git a/src/search.cpp b/src/search.cpp index 355eed1b..d93fbdf7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -903,7 +903,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;