fix incorrect check of enpassant square (x -> y) for checks/checkmate - chess-p… | |
git clone git://git.codemadness.org/chess-puzzles | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 32c2e6a2c44fba3b0242123894dcacf79f59578f | |
parent 13632b938c00ed21681a7bde25d8c119666524b8 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 11 Jun 2024 15:41:46 +0200 | |
fix incorrect check of enpassant square (x -> y) for checks/checkmate | |
Diffstat: | |
M fen.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/fen.c b/fen.c | |
@@ -932,7 +932,7 @@ ischeckmated(struct board *b, int side) | |
int x, y, x2, y2, px, py, piece; | |
px = b->enpassantsquare[0]; | |
- py = b->enpassantsquare[0]; | |
+ py = b->enpassantsquare[1]; | |
/* check pieces that can block or take a piece that removes the check … | |
for (y = 0; y < 8; y++) { |