X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.c;h=de9ee25582b48f9ee31708de9090284e1683f909;hb=971e8861ca82286fa3d6e850dd80277875cee983;hp=09bb390b54548591b8626fef39ac15f85b54f538;hpb=12fa48d7b282c15a16eefc5bdc246daa25ae4dfe;p=xboard.git diff --git a/parser.c b/parser.c index 09bb390..de9ee25 100644 --- a/parser.c +++ b/parser.c @@ -144,7 +144,7 @@ int NextUnit(char **p) { // 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; } @@ -356,7 +356,7 @@ badMove:// we failed to find algebraic move 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;