From f902ddaa89440cd2f3a981cc1dfbfad609a9e0fb Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 1 Jan 2011 23:10:37 +0100 Subject: [PATCH] Fix a crash on multi-pv Bug reported by Tobias Haspel and fixed by Joona. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;