X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=84ac4465ca845a9172cffba14626af16ac916b83;hb=95244a1c40718e9ad8bda9e2df66677e180354d6;hp=7ca879f0e8633494a56076171bf28c04cbbde5e7;hpb=e5fcfee6ac8d8caa96337ae9c17562e7d5c03c11;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 7ca879f..84ac446 100644 --- a/dialogs.c +++ b/dialogs.c @@ -546,7 +546,7 @@ Pick (int n) } gameInfo.variant = v; - appData.variant = VariantName(v); + ASSIGN(appData.variant, VariantName(v)); shuffleOpenings = FALSE; /* [HGM] shuffle: possible shuffle reset when we switch */ startedFromPositionFile = FALSE; /* [HGM] loadPos: no longer valid in new variant */ @@ -555,9 +555,9 @@ Pick (int n) appData.NrFiles = filesTmp; appData.holdingsSize = sizeTmp; appData.pieceToCharTable = NULL; - appData.pieceNickNames = ""; - appData.colorNickNames = ""; - appData.men = ""; + ASSIGN(appData.pieceNickNames, ""); + ASSIGN(appData.colorNickNames, ""); + ASSIGN(appData.men, ""); PopDown(TransientDlg); Reset(True, True); return; @@ -1607,10 +1607,10 @@ static Option shuffleOptions[] = { static void SetRandom (int n) { - int r = n==2 ? -1 : random() & (1<<30)-1; + int r = n==3 ? -1 : random() & (1<<30)-1; char buf[MSG_SIZ]; snprintf(buf, MSG_SIZ, "%d", r); - SetWidgetText(&shuffleOptions[1], buf, TransientDlg); + SetWidgetText(&shuffleOptions[2], buf, TransientDlg); SetWidgetState(&shuffleOptions[0], True); }