} else gameInfo.variant = newVariant;
CopyBoard(oldBoard, board); // remember correctly formatted board
InitPosition(FALSE); /* this sets up board[0], but also other stuff */
- if(currentMove == 0) CopyBoard(board, oldBoard); // preserve start position
- DrawPosition(TRUE, boards[currentMove]);
+ DrawPosition(TRUE, currentMove ? boards[currentMove] : oldBoard);
}
static int loggedOn = FALSE;
/* Usually suppress following prompt */
if (!(forwardMostMove == 0 && gameMode == IcsExamining)) {
+ while(looking_at(buf, &i, "\n")); // [HGM] skip empty lines
if (looking_at(buf, &i, "*% ")) {
savingComment = FALSE;
}
timeIncrement = increment * 1000;
movesPerSession = 0;
gameInfo.timeControl = TimeControlTagValue();
- VariantSwitch(board, StringToVariant(gameInfo.event) );
+ VariantSwitch(boards[currentMove], StringToVariant(gameInfo.event) );
if (appData.debugMode) {
fprintf(debugFP, "ParseBoard says variant = '%s'\n", gameInfo.event);
fprintf(debugFP, "recognized as %s\n", VariantName(gameInfo.variant));