X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=91fbd103a739ccfd84b5fec8717ec90b0e1b4858;hp=9771bcff40d284e605e53187bc4d6c7b43754a64;hb=4324276419caf3e1caf7012ebbf47192e9d94648;hpb=43bc5479c2a9a4d3e4c3d2e982eb728bc8b0fd14 diff --git a/src/position.cpp b/src/position.cpp index 9771bcff..91fbd103 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1199,7 +1199,7 @@ void Position::undo_move(Move m) { if (st->capture) { - assert(capture != KING); + assert(st->capture != KING); // Replace the captured piece set_bit(&(byColorBB[them]), to); @@ -1348,7 +1348,7 @@ void Position::undo_promotion_move(Move m) { if (st->capture) { - assert(capture != KING); + assert(st->capture != KING); // Insert captured piece: set_bit(&(byColorBB[them]), to); @@ -1358,7 +1358,7 @@ void Position::undo_promotion_move(Move m) { // Update material. Because the move is a promotion move, we know // that the captured piece cannot be a pawn. - assert(capture != PAWN); + assert(st->capture != PAWN); npMaterial[them] += piece_value_midgame(st->capture); // Update piece list @@ -1389,7 +1389,7 @@ void Position::undo_ep_move(Move m) { Square to = move_to(m); Square capsq = (us == WHITE)? (to - DELTA_N) : (to - DELTA_S); - assert(to == ep_square()); + assert(to == st->previous->epSquare); assert(relative_rank(us, to) == RANK_6); assert(piece_on(to) == piece_of_color_and_type(us, PAWN)); assert(piece_on(from) == EMPTY);