From: H.G.Muller Date: Sun, 11 Feb 2018 11:11:54 +0000 (+0100) Subject: Fix check test X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=70aa0d4c1af1e1e9704cb60d9a5022fe4f1240ff;p=crazywa.git Fix check test When locating the check tet in a separate routine, the stack frame of the paret node was used to return the result, rather than that of the node itself. --- diff --git a/dropper.c b/dropper.c index dff73d0..a2d9e3d 100644 --- a/dropper.c +++ b/dropper.c @@ -980,8 +980,8 @@ CheckTest (int stm, StackFrame *ff, StackFrame *f) if(x == king) f->checker = ff->toSqr, f->checkDir = v, f->checkDist = dist[vec]; // ray is clear, distant check } else if(match & C_CONTACT) f->checker = ff->toSqr, f->checkDir = 0; // contact check if(ff->mutation != -1) { // board move (no drop) - DiscoTest(stm, ff->fromSqr, king, ff); - if(board[ff->captSqr] == 0) DiscoTest(stm, ff->captSqr, king, ff); // e.p. capture can discover check as well + DiscoTest(stm, ff->fromSqr, king, f); + if(board[ff->captSqr] == 0) DiscoTest(stm, ff->captSqr, king, f); // e.p. capture can discover check as well } } }