X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pgntags.c;h=b07f977ae01a082775561bf2fe3e19469df41bea;hb=cd63bf5b43dae0ac9d9ae1efaba0e23270f65760;hp=f13eb963cd7dacdb7e30fe2dea6a3a0c560f2b80;hpb=ba3e6a6301920d112fde459b61a5a5206565dcbd;p=xboard.git diff --git a/pgntags.c b/pgntags.c index f13eb96..b07f977 100644 --- a/pgntags.c +++ b/pgntags.c @@ -1,7 +1,7 @@ /* * 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 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -115,10 +115,12 @@ 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 */ + success = TRUE; } else if (StrCaseCmp(name, PGN_OUT_OF_BOOK) == 0) { /* [AS] Out of book annotation */ success = StrSavePtr(value, &gameInfo->outOfBook) != NULL;