From: H.G. Muller Date: Tue, 24 Apr 2012 09:23:04 +0000 (+0200) Subject: Decapitalize promoChar in move parser X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e5731b357fd93d3601ff91de7fe56b67be25694c;p=xboard.git Decapitalize promoChar in move parser --- diff --git a/parser.c b/parser.c index c195d7e..6200d0f 100644 --- a/parser.c +++ b/parser.c @@ -153,8 +153,8 @@ PromoSuffix (char **p) if(**p == 'e' && (Match("ep", p) || Match("e.p.", p))) { *p = start; return NULLCHAR; } // non-compliant e.p. suffix is no promoChar! if(**p == '+' && gameInfo.variant == VariantShogi) { (*p)++; return '+'; } if(**p == '=' || (gameInfo.variant == VariantSChess) && **p == '/') (*p)++; // optional = (or / for Seirawan gating) - if(**p == '(' && (*p)[2] == ')' && isalpha( (*p)[1] )) { (*p) += 3; return (*p)[-2]; } - if(isalpha(**p)) return *(*p)++; + if(**p == '(' && (*p)[2] == ')' && isalpha( (*p)[1] )) { (*p) += 3; return ToLower((*p)[-2]); } + if(isalpha(**p)) return ToLower(*(*p)++); if(*p != start) return '='; // must be the optional = return NULLCHAR; // no suffix detected }