From 7949d2168ee377694b645dc909f3cb93039588ee Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 13 Jan 2016 22:23:55 +0100 Subject: [PATCH] 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. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.0.4