From 2cb8af0d46f997c76c459b8f09f16cae01b0c5b0 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 27 Nov 2015 17:55:13 +0100 Subject: [PATCH] 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. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.0.4