From 58679bbcd13fd872e3595c088e4d906ecd70efdf Mon Sep 17 00:00:00 2001 From: Byrial Jensen Date: Sun, 18 Dec 2011 17:08:46 +0100 Subject: [PATCH] Give numeric options the value 0 if a non-numeric text is entered. Before the value ended up undefined. --- xoptions.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); -- 1.7.0.4