diff --git a/source/search.cpp b/source/search.cpp index 296d31b..90812fb 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -276,7 +276,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // Late move pruning // If we are near a leaf node we prune moves // that are late in the list - if (!isPV && ply && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { + if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { int lmpBase = 3; int lmpThreshold = lmpBase + depth * depth;