projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
95ca321
)
Fix invalid combobox entry WB
author
H.G. Muller
<h.g.muller@hccnet.nl>
Wed, 12 Oct 2011 15:38:33 +0000 (17:38 +0200)
committer
H.G. Muller
<h.g.muller@hccnet.nl>
Wed, 12 Oct 2011 15:56:40 +0000 (17:56 +0200)
A combobox label that was not in the list (because the user typed
it, rather than selecting one) would cause a crash.
winboard/wsettings.c
patch
|
blob
|
history
diff --git
a/winboard/wsettings.c
b/winboard/wsettings.c
index
22b182c
..
509b6d4
100644
(file)
--- a/
winboard/wsettings.c
+++ b/
winboard/wsettings.c
@@
-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