From 94d2b2b896207fac048806e05c8a114297b1a513 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 26 Sep 2014 20:24:05 +0200 Subject: [PATCH] Fix reset of 50-move counter on FRC castling The FxR internal representation was taken a bit too seriously! --- backend.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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)) { -- 1.7.0.4