From c18e1d1cc90c5871b7d245d423c4b0f80b1fa6ca Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 30 Oct 2012 11:20:54 +0100 Subject: [PATCH] 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. --- dialogs.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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 || -- 1.7.0.4