bugfix: looking for checkers in isLegalEnPassant didn't start from the king

This commit is contained in:
rektdie committed 2024-04-16 16:24:57 +02:00
1 parent 9c787303f8
commit 28d8b2689f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -440,7 +440,7 @@ static bool IsLegalEnPassant(Board &board, int square) {
// Either east or west
if (abs(directionToKing) == 1) {
int currentSq = square - directionToKing;
int currentSq = kingSquare.getLS1BIndex() - directionToKing;
Bitboard endingFile = directionToKing > 0 ? files[H] : files[A];