From: H.G.Muller Date: Sun, 18 Feb 2018 10:20:09 +0000 (+0100) Subject: Fix board corruption on null move X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b9942fbfad217952a1135345d47860be3ebee6a6;p=crazywa.git Fix board corruption on null move Faking a piece other than the one actually there on the to-square of a null move interfered with the kludge for testing castling legality, by actually putting back that piece there. Better solutions should be possible here. --- diff --git a/dropper.c b/dropper.c index 8261873..742f8ec 100644 --- a/dropper.c +++ b/dropper.c @@ -1223,7 +1223,7 @@ Search (int stm, int alpha, int beta, StackFrame *ff, int depth, int reduction, f.mutation = -2; // kludge to suppress testing for discovered check f.newEval = f.pstEval; f.newKey = f.hashKey; - f.epSqr = -1; f.fromSqr = f.toSqr = f.captSqr = 1; f.toPiece = stm; // fake Pawn to suppress early move gen in reply node + f.epSqr = -1; f.fromSqr = f.toSqr = f.captSqr = 1; f.toPiece = board[1]; deprec[ply] = maxDepth << 16 | depth << 8; path[ply++] = 0; score = -Search(stm, -beta, 1-beta, &f, nullDepth, 0, nullDepth); ply--;