Fix a 'value > VALUE_INFINITE' assert
[stockfish] / src / search.cpp
index cf640a0a90beb33e497474ea514b899d2f006b3b..6bdf255c3dafee03b8b2fff95536cc7a7405fba7 100644 (file)
@@ -646,6 +646,7 @@ namespace {
         && !inCheck
         &&  eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
         &&  abs(beta) < VALUE_MATE_IN_MAX_PLY
+        &&  abs(eval) < VALUE_KNOWN_WIN
         &&  pos.non_pawn_material(pos.side_to_move()))
         return eval - futility_margin(depth, (ss-1)->futilityMoveCount);