From e5731b357fd93d3601ff91de7fe56b67be25694c Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 24 Apr 2012 11:23:04 +0200 Subject: [PATCH] Decapitalize promoChar in move parser --- parser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 } -- 1.7.0.4