projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c239df0
)
Fix DarkSquare bug in piece counting
author
H.G.Muller
<hgm@hgm-xboard.(none)>
Fri, 27 Nov 2015 16:55:13 +0000 (17:55 +0100)
committer
H.G.Muller
<hgm@hgm-xboard.(none)>
Fri, 27 Nov 2015 16:55:13 +0000 (17:55 +0100)
When counting pieces for adjudication purposes, a DarkSquare on the
board caused an out-of-bounds access to the counter array.
backend.c
patch
|
blob
|
history
diff --git
a/backend.c
b/backend.c
index
95ab011
..
6ec7be2
100644
(file)
--- 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;