bugfix: looking for checkers in isLegalEnPassant didn't start from the king
This commit is contained in:
1 parent
9c787303f8
commit
28d8b2689f
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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];
|
||||
|
||||
|
||||
Reference in new issue
Block a user