From: H.G.Muller Date: Wed, 27 Jan 2016 19:14:07 +0000 (+0100) Subject: Fix pasting of moves after starting from position file X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8bd7a1e708318c5f1eb68166b81f8007fa953b9b;p=xboard.git Fix pasting of moves after starting from position file 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. --- diff --git a/backend.c b/backend.c index 29e5297..35b8a28 100644 --- a/backend.c +++ b/backend.c @@ -1740,6 +1740,7 @@ InitBackEnd3 P((void)) if(!blackPlaysFirst) { startedFromPositionFile = TRUE; CopyBoard(filePosition, boards[0]); + CopyBoard(initialPosition, boards[0]); } } if (initialMode == AnalyzeMode) { @@ -12989,7 +12990,7 @@ LoadGame (FILE *f, int gameNumber, char *title, int useList) gameInfo.event = StrSave(yy_text); } - startedFromSetupPosition = FALSE; + startedFromSetupPosition = startedFromPositionFile; // [HGM] while (cm == PGNTag) { if (appData.debugMode) fprintf(debugFP, "Parsed PGNTag: %s\n", yy_text);