{ // Main parser routine
int coord[4], n, result, piece, i;
char type[4], promoted, separator, slash, *oldp, *commentEnd, c;
- int wom = WhiteOnMove(yyboardindex);
+ int wom = quickFlag ? quickFlag&1 : WhiteOnMove(yyboardindex);
// ********* try white first, because it is so common **************************
if(**p == ' ' || **p == '\n' || **p == '\t') { parseStart = (*p)++; return Nothing; }
ff = (BOARD_WIDTH-1)>>1; // this would be d-file
if (boards[yyboardindex][rf][ff] == king) {
/* ICS wild castling */
- ft = castlingType == 1 ? BOARD_LEFT+1 : BOARD_RGHT-3;
+ ft = castlingType == 1 ? BOARD_LEFT+1 : (gameInfo.variant == VariantJanus ? BOARD_RGHT-2 : BOARD_RGHT-3);
} else {
ff = BOARD_WIDTH>>1; // e-file
ft = castlingType == 1 ? BOARD_RGHT-2 : BOARD_LEFT+2;