chess-puzzles

chess puzzle book generator
git clone git://git.codemadness.org/chess-puzzles
Log | Files | Refs | README | LICENSE

commit abc52654a913253417dcd329cf70a975f8674dd6
parent df3a95f12df8a701ed0ad5997be6ad5c3f840bda
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon,  8 Jan 2024 21:54:24 +0100

fen.c: fix invalid piece name for queenside castling for black

This probably affects queenside castling for black with Chess960 and certain
combinations (rook very close next to king).
(Writing more Chess960 and castling tests is on my TODO already.)

Diffstat:
Mfen.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fen.c b/fen.c @@ -1203,7 +1203,7 @@ board_playmoves(struct board *b, const char *moves) break; } } - } else if (x2 < x - 1 || takepiece == 'R') { + } else if (x2 < x - 1 || takepiece == 'r') { /* black: queenside castling */ for (i = x2; i >= 0; i--) { if (getpiece(b, i, y2) == 'r') {