From: H.G.Muller Date: Fri, 27 Nov 2015 16:55:13 +0000 (+0100) Subject: Fix DarkSquare bug in piece counting X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=2cb8af0d46f997c76c459b8f09f16cae01b0c5b0 Fix DarkSquare bug in piece counting When counting pieces for adjudication purposes, a DarkSquare on the board caused an out-of-bounds access to the counter array. --- diff --git a/backend.c b/backend.c index 95ab011..6ec7be2 100644 --- a/backend.c +++ b/backend.c @@ -8109,7 +8109,7 @@ Adjudicate (ChessProgramState *cps) // most tests only when we understand the game, i.e. legality-checking on if( appData.testLegality ) { /* [HGM] Some more adjudications for obstinate engines */ - int nrW, nrB, bishopColor, staleW, staleB, nr[EmptySquare+1], i; + int nrW, nrB, bishopColor, staleW, staleB, nr[EmptySquare+2], i; static int moveCount = 6; ChessMove result; char *reason = NULL;