Reset negative statScore on fail high
[stockfish] / src / search.cpp
index 435b720..50f3a01 100644 (file)
@@ -1085,6 +1085,7 @@ moves_loop: // When in check, search starts from here
               else
               {
                   assert(value >= beta); // Fail high
+                  ss->statScore = std::max(ss->statScore, 0);
                   break;
               }
           }