When a pawn move of type exf5 was illegal, the parser made an attempt to
interpret it as e.p. capture of f5. This, however, messed up the move,
so that it was now permanently mistaken for e5xf6. Even in cases with
legality testing off, where you would want the original move to be
accepted despite the fact that it was illegal.
if (result == WhiteCapturesEnPassant || result == BlackCapturesEnPassant)
return (int) result;
- else
+ else { // [HGM] all very nice, but this messed up the input move that we might want to accept with legality testing off...
+ if (WhiteOnMove(yyboardindex)) // undo the damage
+ currentMoveString[1]--, currentMoveString[3]--;
+ else currentMoveString[1]++, currentMoveString[3]++;
return (int) IllegalMove;
+ }
}
"+"?[A-Z][xX:-]?[a-l][0-9]((=?\(?[A-Z]\)?)|[=+])? {