void\r
VariantShowRadio(HWND hDlg)\r
{\r
- char c = *engineVariant;\r
+ char c = *engineVariant, *v, *p;\r
int i=0, j;\r
CheckDlgButton(hDlg, radioButton[gameInfo.variant], TRUE);\r
*engineVariant = NULLCHAR; // [HGM] kludge to prevent VariantName will always return engineVariant\r
while((j = radioButton[i++]) != -2) {\r
if(j == -1) continue; // no menu button\r
- EnableWindow(GetDlgItem(hDlg, j), appData.noChessProgram || strstr(first.variants, VariantName(i-1)));\r
+ v = VariantName(i-1); p = strstr(first.variants, v);\r
+ EnableWindow(GetDlgItem(hDlg, j), appData.noChessProgram || p && (!*v || strlen(v) == strlen[p] || p[strlen[v]] == ','));\r
}\r
*engineVariant = c;\r
for(i=0; i<15; i++) { // initialize engine-defined variants\r