Skip to content

Commit

Permalink
fix key
Browse files Browse the repository at this point in the history
bench 1352855
  • Loading branch information
xu-shawn committed Oct 11, 2024
1 parent 81c1d31 commit 1eea47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
st->nonPawnMaterial[them] -= PieceValue[captured];
st->nonPawnKey[them] ^= Zobrist::psq[captured][capsq];

if (type_of(pc) == QUEEN || type_of(pc) == ROOK)
if (type_of(captured) == QUEEN || type_of(captured) == ROOK)
st->majorPieceKey ^= Zobrist::psq[captured][capsq];

else
Expand Down

0 comments on commit 1eea47b

Please sign in to comment.