From f3a68fb378aa91c6e4b3f54fb875074888a07180 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 5 Jan 2011 17:19:35 +0100 Subject: [PATCH] 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. --- parser.l | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.0.4