The parser assumed O-O and O-O-O castlings would always take place
on the back rank, even when the newly introduced castlingRank array
specified differently.
if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
if (wom) {
- rf = 0;
- rt = 0;
+ rf = castlingRank[0];
+ rt = castlingRank[0];
king = WhiteKing;
} else {
- rf = BOARD_HEIGHT-1;
- rt = BOARD_HEIGHT-1;
+ rf = castlingRank[3];
+ rt = castlingRank[3];
king = BlackKing;
}
ff = (BOARD_WIDTH-1)>>1; // this would be d-file
or a (non-constant) char* */
extern int yyoffset P((void));
extern signed char initialRights[BOARD_FILES];
+extern signed char castlingRank[BOARD_FILES];
+