From: H.G.Muller Date: Sat, 14 Jan 2017 17:40:30 +0000 (+0100) Subject: Assert no unexpected King capture X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0643721e0697ddec902253174450b036557a54b6;p=crazywa.git Assert no unexpected King capture A hash-key collision sometimes leaves a King up for grabs. --- diff --git a/dropper.c b/dropper.c index bc6540e..e5883d2 100644 --- a/dropper.c +++ b/dropper.c @@ -1134,7 +1134,11 @@ if(PATH)printf("%d:%d {%d,%d} max=%d eval=%d check=%02x,%d,%d\n",ply,depth,alp } // move generation - if(!earlyGen) MoveGen(stm, &m, f.rights); // generate moves if we had not done so yet + if(!earlyGen) { // generate moves if we had not done so yet + if(MoveGen(stm, &m, f.rights)) { // impossible (except for hash collision giving wrong in-check status) + Dump("King capture"); + } + } if(hashMove) moveStack[--m.firstMove] = hashMove; // put hash move in front of list (duplicat!) if(f.checker != CK_NONE) moveSP = m.drops = m.castlings; // clip off castlings when in check