Rather than decoding an unknown variant name, (which will result in
'normal'), we keep the currently set (parent) variant when an
engine-defined variant is currently set that matches the name in
the PGN variant tag of the loaded game.
} 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 */