We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c28c4c commit 8c5ba90Copy full SHA for 8c5ba90
src/position.cpp
@@ -1324,6 +1324,12 @@ bool Position::pos_is_ok() const {
1324
if (p1 != p2 && (pieces(p1) & pieces(p2)))
1325
assert(0 && "pos_is_ok: Bitboards");
1326
1327
+ StateInfo si = *st;
1328
+ ASSERT_ALIGNED(&si, Eval::NNUE::CacheLineSize);
1329
+
1330
+ set_state();
1331
+ if (std::memcmp(&si, st, sizeof(StateInfo)))
1332
+ assert(0 && "pos_is_ok: State");
1333
1334
for (Piece pc : Pieces)
1335
if ( pieceCount[pc] != popcount(pieces(color_of(pc), type_of(pc)))
0 commit comments