From: H.G.Muller Date: Thu, 16 Oct 2014 19:44:33 +0000 (+0200) Subject: Fix loading of engine-defined PGN games X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=837f9247aaf15b2440dacd4ae4672a0f3f99f787;p=xboard.git 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). --- 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);