X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=b49ba15f79099178e80c2d31033cb9c1ad0d8326;hb=a2f3d790becbea6cd93ec51add89f2251a90bba4;hp=bc6ec28a39d2d768520375c265970327cf6792a2;hpb=f7e29dea65c9eca06c74a24114d07c5a0583bf6e;p=xboard.git diff --git a/backend.c b/backend.c index bc6ec28..b49ba15 100644 --- a/backend.c +++ b/backend.c @@ -6742,7 +6742,7 @@ HasPromotionChoice (int fromX, int fromY, int toX, int toY, char *promoChoice, i *promoChoice = PieceToChar(p++); if(*promoChoice != '.') break; } - return FALSE; + if(!*engineVariant) return FALSE; // if used as parent variant there might be promotion choice } // no sense asking what we must promote to if it is going to explode... if(gameInfo.variant == VariantAtomic && boards[currentMove][toY][toX] != EmptySquare) { @@ -7449,8 +7449,8 @@ CanPromote (ChessSquare piece, int y) // some variants have fixed promotion piece, no promotion at all, or another selection mechanism if(IS_SHOGI(gameInfo.variant) || gameInfo.variant == VariantXiangqi || gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat || - gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || - gameInfo.variant == VariantMakruk) return FALSE; + (gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || + gameInfo.variant == VariantMakruk) && !*engineVariant) return FALSE; return (piece == BlackPawn && y <= zone || piece == WhitePawn && y >= BOARD_HEIGHT-1-zone || piece == BlackLance && y <= zone ||