X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.cpp;h=97581e126316ecb79757388fe8ca66701a6b24ea;hb=d558f8a673b56b32ab6da8050f41b9e02fe1758b;hp=ba015d3c38edb3cf87be062f952f4fbcec568cc4;hpb=900f249f596417b35129f1dc357cd5392018e575;p=stockfish diff --git a/src/position.cpp b/src/position.cpp index ba015d3c..97581e12 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -283,8 +283,6 @@ Position& Position::set(const string& fenStr, bool isChess960, StateInfo* si, Th thisThread = th; set_state(st); - assert(pos_is_ok()); - return *this; } @@ -1080,8 +1078,9 @@ bool Position::see_ge(Move m, Value threshold) const { if (swap <= 0) return true; + assert(color_of(piece_on(from)) == sideToMove); Bitboard occupied = pieces() ^ from ^ to; - Color stm = color_of(piece_on(from)); + Color stm = sideToMove; Bitboard attackers = attackers_to(to, occupied); Bitboard stmAttackers, bb; int res = 1;