From: Byrial Jensen Date: Sun, 18 Dec 2011 16:08:46 +0000 (+0100) Subject: Give numeric options the value 0 if a non-numeric text is entered. Before the value... X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=58679bbcd13fd872e3595c088e4d906ecd70efdf;p=xboard.git Give numeric options the value 0 if a non-numeric text is entered. Before the value ended up undefined. --- diff --git a/xoptions.c b/xoptions.c index c1ae427..ecfe022 100644 --- a/xoptions.c +++ b/xoptions.c @@ -155,7 +155,7 @@ void SpinCallback(w, client_data, call_data) String name, val; Arg args[16]; char buf[MSG_SIZ], *p; - int j; + int j = 0; // Initialiasation is necessary because the text value may be non-numeric causing the scanf conversion to fail int data = (intptr_t) client_data; XtSetArg(args[0], XtNlabel, &name);