From 8bd7a1e708318c5f1eb68166b81f8007fa953b9b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 27 Jan 2016 20:14:07 +0100 Subject: [PATCH] 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. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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); -- 1.7.0.4