From: H.G. Muller Date: Wed, 5 Jan 2011 16:19:35 +0000 (+0100) Subject: Fix promotion suffixon disambiguated piece moves X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f3a68fb378aa91c6e4b3f54fb875074888a07180;p=xboard.git Fix promotion suffixon disambiguated piece moves The promotion suffixon piecemoves that needed disambiguation was not passedon to the back-end in most variants. Now it is passed on in any variant. --- diff --git a/parser.l b/parser.l index e78c23c..061d6ca 100644 --- a/parser.l +++ b/parser.l @@ -620,7 +620,7 @@ extern void CopyBoard P((Board to, Board from)); cl.ftIn = yytext[1+skip] - AAA; cl.promoCharIn = NULLCHAR; - if(yyleng-skip > 3 && (gameInfo.variant == VariantShogi || gameInfo.variant == VariantSChess)) /* [HGM] can have Shogi-style promotion */ + if(yyleng-skip > 3) /* [HGM] in some variants pieces promote */ cl.promoCharIn = yytext[yyleng-1-(yytext[yyleng-1]==')')]; if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi @@ -687,7 +687,7 @@ extern void CopyBoard P((Board to, Board from)); cl.ftIn = yytext[2+skip] - AAA; cl.promoCharIn = NULLCHAR; - if(yyleng-skip > 4 && (gameInfo.variant == VariantShogi || gameInfo.variant == VariantSChess)) /* [HGM] can have Shogi-style promotion */ + if(yyleng-skip > 4) /* [HGM] in some variants pieces promote */ cl.promoCharIn = yytext[yyleng-1-(yytext[yyleng-1]==')')]; if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi