When starting from a position file boards[0] would be set to the position,
but initialPosition was not. In LoadGame() initialPosition would then be
copied to boards[0] before loading the game, and without FEN or variant
PGN tag would not be corrected.
if(!blackPlaysFirst) {
startedFromPositionFile = TRUE;
CopyBoard(filePosition, boards[0]);
+ CopyBoard(initialPosition, boards[0]);
}
}
if (initialMode == AnalyzeMode) {
gameInfo.event = StrSave(yy_text);
}
- startedFromSetupPosition = FALSE;
+ startedFromSetupPosition = startedFromPositionFile; // [HGM]
while (cm == PGNTag) {
if (appData.debugMode)
fprintf(debugFP, "Parsed PGNTag: %s\n", yy_text);