The oldBoard was a local variable, and only squares of the old board
were initialized. This led to a crash if the copied board was enlarged,
and then displayed. The variable is now declared static, so the
uninitialized squares contain harmless zeros.
VariantSwitch(Board board, VariantClass newVariant)
{
int newHoldingsWidth, newWidth = 8, newHeight = 8, i, j;
- Board oldBoard;
+ static Board oldBoard;
startedFromPositionFile = FALSE;
if(gameInfo.variant == newVariant) return;