From 42011a3865940552276f9de4b8fe41a4e2c14946 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 24 Feb 2010 17:01:23 +0100 Subject: [PATCH] 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.) --- backend.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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 ) { -- 1.7.0.4