projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
58679bb
)
Give numeric options the value 0 if a non-numeric text is entered (one more place...
author
Byrial Jensen
<byrial@vip.cybercity.dk>
Sun, 18 Dec 2011 16:18:12 +0000 (17:18 +0100)
committer
Byrial Jensen
<byrial@vip.cybercity.dk>
Sun, 18 Dec 2011 16:18:12 +0000 (17:18 +0100)
xoptions.c
patch
|
blob
|
history
diff --git
a/xoptions.c
b/xoptions.c
index
ecfe022
..
8cc231a
100644
(file)
--- a/
xoptions.c
+++ b/
xoptions.c
@@
-813,7
+813,7
@@
int GenericReadout(int selected)
String val;
Arg args[16];
char buf[MSG_SIZ], **dest;
- float x;
+ float x = 0.0; // Initialise because sscanf() will fail if non-numeric text is entered
for(i=0; ; i++) { // send all options that had to be OK-ed to engine
if(selected >= 0) { if(i < selected) continue; else if(i > selected) break; }
switch(currentOption[i].type) {