X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=moves.c;h=3205d2f0b5d8498442d1abad6c95b50cbe88361e;hp=abf193607df55a3310e7b940b77e8b05cb78da09;hb=981710835fb91625593928380d26952642118781;hpb=e590c8bf42707d81e90883a8c08d9044469efe79 diff --git a/moves.c b/moves.c index abf1936..3205d2f 100644 --- a/moves.c +++ b/moves.c @@ -1408,7 +1408,7 @@ GenLegalCallback (Board board, int flags, ChessMove kind, int rf, int ff, int rt if(rFilter >= 0 && rFilter != rt || fFilter >= 0 && fFilter != ft) return; // [HGM] speed: ignore moves with wrong to-square - if (board[EP_STATUS] == EP_IRON_LION && (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion)) return; //[HGM] lion + if ((int)board[EP_STATUS] == EP_IRON_LION && (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion)) return; //[HGM] lion if (!(flags & F_IGNORE_CHECK) ) { int check, promo = (gameInfo.variant == VariantSpartan && kind == BlackPromotion); @@ -1664,11 +1664,11 @@ CheckTestCallback (Board board, int flags, ChessMove kind, int rf, int ff, int r register CheckTestClosure *cl = (CheckTestClosure *) closure; if (rt == cl->rking && ft == cl->fking) { - if(xqCheckers[EP_STATUS] >= 2 && xqCheckers[rf][ff]) return; // checker is piece with suspended checking power + if((int)xqCheckers[EP_STATUS] >= 2 && xqCheckers[rf][ff]) return; // checker is piece with suspended checking power cl->check++; xqCheckers[rf][ff] = xqCheckers[EP_STATUS] & 1; // remember who is checking (if status == 1) } - if( board[EP_STATUS] == EP_ROYAL_LION && (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion) + if( (int)board[EP_STATUS] == EP_ROYAL_LION && (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion) && (gameInfo.variant != VariantLion || board[rf][ff] != WhiteKing && board[rf][ff] != BlackKing) ) cl->check++; // [HGM] lion: forbidden counterstrike against Lion equated to putting yourself in check }