X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=774784400b7cab2ec9380c596ccb611c1ac16526;hb=9b4c2f6e576b10ffb1ce3a08edc0bc2f7454bf41;hp=674a9d30870c0577ccc8f842cf95b4018f7e26a3;hpb=34349ddea87670e7208786d96e1af00dc6fc5df0;p=xboard.git diff --git a/backend.c b/backend.c index 674a9d3..7747844 100644 --- a/backend.c +++ b/backend.c @@ -7726,7 +7726,9 @@ printf("(%d,%d)-(%d,%d) %d %d\n",fromX,fromY,toX,toY,x,y); if(gatingPiece != EmptySquare && gameInfo.variant == VariantSChess) promoChoice = ToLower(PieceToChar(gatingPiece)); - if (HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, appData.sweepSelect)) { + if(legal[toY][toX] == 2) promoChoice = ToLower(PieceToChar(defaultPromoChoice)); // highlight-induced promotion + + if (legal[toY][toX] == 2 || HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, appData.sweepSelect)) { SetHighlights(fromX, fromY, toX, toY); MarkTargetSquares(1); if(gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat || gameInfo.variant == VariantGrand) {