From: H.G.Muller Date: Fri, 26 Sep 2014 18:24:05 +0000 (+0200) Subject: Fix reset of 50-move counter on FRC castling X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=94d2b2b896207fac048806e05c8a114297b1a513;p=xboard.git Fix reset of 50-move counter on FRC castling The FxR internal representation was taken a bit too seriously! --- diff --git a/backend.c b/backend.c index 94e6393..f988046 100644 --- a/backend.c +++ b/backend.c @@ -9975,6 +9975,7 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) /* FRC castling assumed when king captures friendly rook. [HGM] or RxK for S-Chess */ if (board[fromY][fromX] == WhiteKing && board[toY][toX] == WhiteRook || board[fromY][fromX] == WhiteRook && board[toY][toX] == WhiteKing) { + board[EP_STATUS] = EP_NONE; // capture was fake! board[fromY][fromX] = EmptySquare; board[toY][toX] = EmptySquare; if((toX > fromX) != (piece == WhiteRook)) { @@ -9984,6 +9985,7 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) } } else if (board[fromY][fromX] == BlackKing && board[toY][toX] == BlackRook || board[fromY][fromX] == BlackRook && board[toY][toX] == BlackKing) { + board[EP_STATUS] = EP_NONE; board[fromY][fromX] = EmptySquare; board[toY][toX] = EmptySquare; if((toX > fromX) != (piece == BlackRook)) {