The loop to clear the game history was still using the array bounds from
before the array was enlarged.
for(i=-2*22-2; i<13*22-2; i++) board[i] = -1; // boundary guards (or holdings counters)
for(r=0; r<nrRanks; r++) for(f=0; f<nrFiles; f++) board[22*r+f] = 0; // playing area
for(f=0; f<11; f++) pawnCount[f] = 0xF0; // Pawn occupancy per file
- for(i=0; i<512+20; i++) repKey[i] = 0; // game-history hash
+ for(i=0; i<512+100; i++) repKey[i] = 0; // game-history hash
promoGain[WHITE+30] = promoGain[BLACK+30] = 0;// danger measure of in-hand pieces
}