From: H.G. Muller Date: Wed, 24 Feb 2010 16:01:23 +0000 (+0100) Subject: Do not recognize non-ICS variants from PGN event tag X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=42011a3865940552276f9de4b8fe41a4e2c14946;p=xboard.git Do not recognize non-ICS variants from PGN event tag These variants were introduced after supporting the variant tag, so if the variant tag is missing, their recognition from the event tag will be a false match. (Mainly to prevent events with 'super' in the name being recognized as Superchess.) --- diff --git a/backend.c b/backend.c index 7a3c731..c4da592 100644 --- a/backend.c +++ b/backend.c @@ -10175,7 +10175,9 @@ LoadGame(f, gameNumber, title, useList) if (numPGNTags > 0){ char *tags; if (gameInfo.variant == VariantNormal) { - gameInfo.variant = StringToVariant(gameInfo.event); + VariantClass v = StringToVariant(gameInfo.event); + // [HGM] do not recognize variants from event tag that were introduced after supporting variant tag + if(v < VariantShogi) gameInfo.variant = v; } if (!matchMode) { if( appData.autoDisplayTags ) {