]> git.sesse.net Git - stockfish/blobdiff - src/search.h
Fix multiPV issue #502
[stockfish] / src / search.h
index ba8a90539e6f7c343dea616136ec95a3ba59915a..1218ef3be223289f10fbb744d3bab771d1b32fb8 100644 (file)
@@ -57,7 +57,8 @@ struct RootMove {
 
   explicit RootMove(Move m) : pv(1, m) {}
 
-  bool operator<(const RootMove& m) const { return m.score < score; } // Descending sort
+  bool operator<(const RootMove& m) const {
+    return m.score != score ? m.score < score : m.previousScore < previousScore; } // Descending sort
   bool operator==(const Move& m) const { return pv[0] == m; }
   bool extract_ponder_from_tt(Position& pos);