From: H.G.Muller Date: Mon, 2 Jun 2014 17:37:28 +0000 (+0200) Subject: Fix phantom move when no non-captures X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b3826cf0103b476b9500318a6c6b974ebf2a14af;p=hachu.git Fix phantom move when no non-captures When there were no non-captures generated at all, a random one would be tried that happened to be left on the move stack from another node, which needed not even be a faulty move. In some tsume problems where this move happened to be the capture of the King with an empty square, this lead to reporting false mates. (Usually you only have no non-captures if you have no pieces, and in tsume you might not even have a King.) --- diff --git a/hachu.c b/hachu.c index 0eea758..0c8a239 100644 --- a/hachu.c +++ b/hachu.c @@ -1950,6 +1950,7 @@ if(PATH) printf("# autofail end (%d-%d)\n", firstMove, msp); case 6: // non-captures nonCapts = msp; nullMove = GenNonCapts(oldPromo); + if(msp == nonCapts) goto cutoff; #ifdef KILLERS { // swap killers to front Move h = killer[level][0]; int j = curMove;