From: H.G.Muller Date: Thu, 16 Oct 2014 18:29:27 +0000 (+0200) Subject: Preserve parent variant for PGN of engine-defined game X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1a37d04c539f7b8d702c9ea76009ee196969ca38;p=xboard.git Preserve parent variant for PGN of engine-defined game Rather than decoding an unknown variant name, (which will result in 'normal'), we keep the currently set (parent) variant when an engine-defined variant is currently set that matches the name in the PGN variant tag of the loaded game. --- diff --git a/pgntags.c b/pgntags.c index 616303d..fd74df7 100644 --- a/pgntags.c +++ b/pgntags.c @@ -115,7 +115,8 @@ ParsePGNTag (char *tag, GameInfo *gameInfo) } else if (StrCaseCmp(name, "Variant") == 0) { /* xboard-defined extension */ success = StrSavePtr(value, &gameInfo->variantName) != NULL; - gameInfo->variant = StringToVariant(value); + if(*value && strcmp(value, engineVariant)) // keep current engine-defined variant if it matches + gameInfo->variant = StringToVariant(value); } else if (StrCaseCmp(name, "VariantMen") == 0) { /* for now ignore this tag, as we have no method yet */ /* for assigning the pieces to XBoard pictograms */