]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix an off-by-one bug in multi pv print
[stockfish] / src / search.cpp
index 8dc1f85d9e51a30194f48a3c96d2170aa467259a..bfade6d09b52b4b89b1588d1483166ef1b898131 100644 (file)
@@ -394,7 +394,7 @@ namespace {
             }
 
             // Sort the PV lines searched so far and update the GUI
-            sort<RootMove>(RootMoves.begin(), RootMoves.begin() + PVIdx);
+            sort<RootMove>(RootMoves.begin(), RootMoves.begin() + PVIdx + 1);
             sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl;
         }