Fix invalid combobox entry WB
[xboard.git] / winboard / wsettings.c
index 22b182c..509b6d4 100644 (file)
@@ -389,7 +389,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)
                for(k=0; k<optionList[j].max; k++) {\r
                    if(!strcmp(choices[k], newText)) new = k;\r
                }\r
-               if(!cps && new) {\r
+               if(!cps && new > 0) {\r
                    if(*(char**)optionList[j].target) free(*(char**)optionList[j].target);\r
                    *(char**)optionList[j].target = strdup(optionList[j].choice[new]);\r
                    break;\r