From 636545bf1dd3469ad645b9b4f656df9086601aa9 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 6 Feb 2016 16:19:52 +0100 Subject: [PATCH] Always assume FEN in variant-fairy PGN game is initial position As variant fairy is a catch-all without a defined initial position, the FEN tag n a PGN game for this variant must be considered an initial position. So we copy over the FEN position to the initial one in this case. Otherwise castling would always be thought illegal in fairy games loaded from PGN. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index b956f94..54c16be 100644 --- a/backend.c +++ b/backend.c @@ -13107,7 +13107,7 @@ 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 + if(*engineVariant || gameInfo.variant == VariantFairy) // [HGM] for now, assume FEN in engine-defined variant game is default initial position CopyBoard(initialPosition, initial_position); if (blackPlaysFirst) { currentMove = forwardMostMove = backwardMostMove = 1; -- 1.7.0.4