From: Tim Mann Date: Tue, 15 Feb 2005 05:43:09 +0000 (+0000) Subject: Fix a longstanding bug reported by Andreas Ruider. A typo in the code X-Git-Tag: v4.2.8~15 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=58f810e02c562394693dfa1850e1b5ffb722611c;p=xboard.git Fix a longstanding bug reported by Andreas Ruider. A typo in the code caused a bug where we didn't test for Black castling into check on the queenside. --- diff --git a/moves.c b/moves.c index bed2064..1a0522f 100644 --- a/moves.c +++ b/moves.c @@ -516,7 +516,7 @@ int GenLegal(board, flags, epfile, callback, closure) board[7][0] == BlackRook && (ignoreCheck || (!CheckTest(board, flags, 7, ff, 7, ff - 1, FALSE) && - !CheckTest(board, flags, 7, ff, 7, ff - 1, FALSE)))) { + !CheckTest(board, flags, 7, ff, 7, ff - 2, FALSE)))) { callback(board, flags, ff==4 ? BlackQueenSideCastle : BlackQueenSideCastleWild,