From 837f9247aaf15b2440dacd4ae4672a0f3f99f787 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 16 Oct 2014 21:44:33 +0200 Subject: [PATCH] Fix loading of engine-defined PGN games Somehow there could be disagreement over what the official opening position of an engine-defined variant was during loading of the game. It then refused Betza-defined castling, which tests the corner pieces based on this initial position. We now assume the FEN tag, which such a PGN game will always contain, holds the official opening position, so that castling will always be assumed possible (if there is a corner piece). --- backend.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index e50e869..bab4386 100644 --- a/backend.c +++ b/backend.c @@ -12877,6 +12877,8 @@ LoadGame (FILE *f, int gameNumber, char *title, int useList) return FALSE; } CopyBoard(boards[0], initial_position); + if(*engineVariant) // [HGM] for now, assume FEN in engine-defined variant game is default initial position + CopyBoard(initialPosition, initial_position); if (blackPlaysFirst) { currentMove = forwardMostMove = backwardMostMove = 1; CopyBoard(boards[1], initial_position); -- 1.7.0.4