X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pgntags.c;h=b40c1980ecbb5dca65f65cb9feaf6eb5e4df82be;hb=0278ebc80411a20fd23303156285e55ce8d2b0a5;hp=616303dffaf569a5573ae5f2aa4d2d896b04b00f;hpb=cf26b3e8a4d056c93860f4292d9cd5fc5cb00890;p=xboard.git diff --git a/pgntags.c b/pgntags.c index 616303d..b40c198 100644 --- a/pgntags.c +++ b/pgntags.c @@ -1,7 +1,8 @@ /* * pgntags.c -- Functions to manage PGN tags * - * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free + * Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -115,7 +116,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 */