From 58f810e02c562394693dfa1850e1b5ffb722611c Mon Sep 17 00:00:00 2001 From: Tim Mann Date: Tue, 15 Feb 2005 05:43:09 +0000 Subject: [PATCH] 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. --- moves.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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, -- 1.7.0.4