X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=d8b85a1672dd2cb9b8d037f95c81e2fdc241f1aa;hb=abc22463364ee2865728feb89bced464a5ce6139;hp=71a795c05a7cbf6b323b33650dfb09048ce6a3ac;hpb=f9f3643ce3447c431ee266ff241cad393872d416;p=xboard.git diff --git a/backend.c b/backend.c index 71a795c..d8b85a1 100644 --- a/backend.c +++ b/backend.c @@ -5527,7 +5527,12 @@ ParseOneMove (char *move, int moveNum, ChessMove *moveType, int *fromX, int *fro case BlackASideCastleFR: /* End of code added by Tord */ case IllegalMove: /* bug or odd chess variant */ - if(currentMoveString[1] == '@') goto drop; // illegal drop + if(currentMoveString[1] == '@') { // illegal drop + *fromX = *moveType == WhiteOnMove(moveNum) ? + (int) CharToPiece(ToUpper(currentMoveString[0])) : + (int) CharToPiece(ToLower(currentMoveString[0])); + goto drop; + } *fromX = currentMoveString[0] - AAA; *fromY = currentMoveString[1] - ONE; *toX = currentMoveString[2] - AAA; @@ -5551,10 +5556,10 @@ ParseOneMove (char *move, int moveNum, ChessMove *moveType, int *fromX, int *fro case WhiteDrop: case BlackDrop: - drop: *fromX = *moveType == WhiteDrop ? (int) CharToPiece(ToUpper(currentMoveString[0])) : (int) CharToPiece(ToLower(currentMoveString[0])); + drop: *fromY = DROP_RANK; *toX = currentMoveString[2] - AAA; *toY = currentMoveString[3] - ONE;