From: H.G.Muller Date: Tue, 2 Feb 2016 16:31:41 +0000 (+0100) Subject: Fix sweep promotions to Tokin X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ec51c847ed215b286d5ca730a4984819403d5194;p=xboard.git Fix sweep promotions to Tokin Sweep promotions of multiple pieces to Tokin were not working, because once the promoted version was shown it would always demote to Pawn. Now the toggle always demotes to the selected piece. --- diff --git a/backend.c b/backend.c index c2a5bfc..fd730e9 100644 --- a/backend.c +++ b/backend.c @@ -5395,6 +5395,7 @@ Partner (ChessSquare *p) { // change piece into promotion partner if one shogi-promotes to the other ChessSquare partner = promoPartner[*p]; if(PieceToChar(*p) != '+' && PieceToChar(partner) != '+') return 0; + if(PieceToChar(*p) == '+') partner = boards[currentMove][fromY][fromX]; *p = partner; return 1; } @@ -6058,7 +6059,10 @@ SetCharTableEsc (unsigned char *table, const char * map, char * escapes) for(p=0; p