fen.c: fix highlight square when castling - chess-puzzles - chess puzzle book generator
(HTM) git clone git://git.codemadness.org/chess-puzzles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 3ccf4d4450965cc2853d9cbc8b81b75cfd44660a
(DIR) parent 7915ffd10d87934201c751632a4e1dd4c3cb65cb
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 00:55:15 +0100
fen.c: fix highlight square when castling
Diffstat:
M fen.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
(DIR) diff --git a/fen.c b/fen.c
@@ -1221,10 +1221,8 @@ board_playmoves(struct board *b, const char *moves)
}
}
if (castled) {
- /* set previous move square (for highlight) */
- x = i;
- y = y2;
place(b, piece, x2, y2); /* place king */
+ x2 = i; /* set square for highlight */
}
/* remove the ability to castle */