]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Assorted clean up in endgames
[stockfish] / src / search.cpp
index dcd8b0d16597510d0067899cec7602c38dc93226..7b43f64a19e63510ba69ed8dfd50e610cf3be5c0 100644 (file)
@@ -941,7 +941,6 @@ moves_loop: // When in check and at SpNode search starts from here
       if (    depth > 3 * ONE_PLY
           && !pvMove
           && !captureOrPromotion
-          && !dangerous
           &&  move != ttMove
           &&  move != ss->killers[0]
           &&  move != ss->killers[1])
@@ -1401,7 +1400,7 @@ moves_loop: // When in check and at SpNode search starts from here
     assert(is_ok(first));
     assert(is_ok(second));
     assert(color_of(pos.piece_on(from_sq(second))) == ~pos.side_to_move());
-    assert(color_of(pos.piece_on(to_sq(first))) == ~pos.side_to_move());
+    assert(type_of(first) == CASTLE || color_of(pos.piece_on(to_sq(first))) == ~pos.side_to_move());
 
     Square m1from = from_sq(first);
     Square m2from = from_sq(second);