]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Do not skip non-recapture ttMove when in check
[stockfish] / src / movepick.cpp
index 153d323e8be87e262be8c80cdaa06269640a8859..f5e023855561063a15ab79770f11b1ed9b6d5257 100644 (file)
@@ -73,8 +73,9 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist
   assert(d <= 0);
 
   stage = (pos.checkers() ? EVASION_TT : QSEARCH_TT) +
-           !(ttm && (depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare)
-                 && pos.pseudo_legal(ttm));
+          !(   ttm
+            && (pos.checkers() || depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare)
+            && pos.pseudo_legal(ttm));
 }
 
 /// MovePicker constructor for ProbCut: we generate captures with SEE greater