Skip to content

Commit e7e7ea3

Browse files
committed
Fix minor piece key
1 parent b5a9adf commit e7e7ea3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/position.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ DirtyPiece Position::do_move(Move m,
555555
{
556556
st->nonPawnKey[us] ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
557557

558-
if (type_of(pc) == KNIGHT && type_of(pc) == CANNON)
558+
if (type_of(pc) == KNIGHT || type_of(pc) == CANNON)
559559
st->minorPieceKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
560560
}
561561

0 commit comments

Comments
 (0)