From: H.G. Muller Date: Tue, 30 Oct 2012 10:20:54 +0000 (+0100) Subject: Fix crash in promotion popup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c18e1d1cc90c5871b7d245d423c4b0f80b1fa6ca;p=xboard.git Fix crash in promotion popup There were not enough entries for Capablanca Chess with legality-testing off, where King is also presented as a choice. --- diff --git a/dialogs.c b/dialogs.c index 49f387f..eda07e3 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1456,6 +1456,7 @@ static Option promoOptions[] = { { 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, { 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, { 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, { 0, SAME_ROW | NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" } }; @@ -1492,7 +1493,7 @@ SetPromo (char *name, int nr, char promoChar) void PromotionPopUp () { // choice depends on variant: prepare dialog acordingly - count = 7; + count = 8; SetPromo(_("Cancel"), --count, 0); // Beware: GenericPopUp cannot handle user buttons named "cancel" (lowe case)! if(gameInfo.variant != VariantShogi) { if (!appData.testLegality || gameInfo.variant == VariantSuicide ||