|
From: | Jacques_Ruiz |
Subject: | Bug in Evaluate(), wrong arguments in call to LoneKing() |
Date: | Tue, 25 Feb 2003 11:02:26 +0100 |
Hello.
I've spotted a bug in Evaluate(), file eval.c.
A call with wrong arguments is made to LoneKing(), passing the same
side as both the winner and the looser.
source:
/* One side has a lone king and other side has no pawns */ if (board.material[xside] == 0 && board.b[side][pawn] == NULLBITBOARD) return LoneKing (side, xside); if (board.material[side] == 0 && board.b[xside][pawn] == NULLBITBOARD) return LoneKing (side, side); /* BUG HERE */ correct version:
/* One side has a lone king and other side has no
pawns */
if (board.material[xside] == 0 && board.b[side][pawn] == NULLBITBOARD) return LoneKing (side, xside); if (board.material[side] == 0 && board.b[xside][pawn] == NULLBITBOARD) return LoneKing (xside, side); /* FIXED */ |
[Prev in Thread] | Current Thread | [Next in Thread] |