From: H.G.Muller Date: Wed, 13 Jan 2016 21:23:55 +0000 (+0100) Subject: Fix variant recognition in ICS mode X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7949d2168ee377694b645dc909f3cb93039588ee;p=xboard.git Fix variant recognition in ICS mode The patch that made recognizing variant names of the 'exotic variants' (i.e. those beyond Shogi) more strict, by requiring an exact match, had broken variant recognition on the Variant ICS. In that case it has to act on strings like "ICS unrated xiangqi game", and this now defaulted to variant normal. The requirement that the variant name should be the first word of the string is now dropped in ICS mode. --- diff --git a/backend.c b/backend.c index a7be826..a3a81ef 100644 --- a/backend.c +++ b/backend.c @@ -2127,7 +2127,7 @@ StringToVariant (char *e) } else for (i=0; i= VariantShogi && (p != e || isalpha(p[strlen(variantNames[i])]))) continue; + if(p && i >= VariantShogi && (p != e && !appData.icsActive || isalpha(p[strlen(variantNames[i])]))) continue; v = (VariantClass) i; found = TRUE; break;