Do not recognize non-ICS variants from PGN event tag
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 24 Feb 2010 16:01:23 +0000 (17:01 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 24 Feb 2010 16:05:15 +0000 (17:05 +0100)
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

index 7a3c731..c4da592 100644 (file)
--- 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 ) {