From adb481366a8bc6046ef01b6ee45db23e4139f26c Mon Sep 17 00:00:00 2001 From: Byrial Jensen Date: Sun, 18 Dec 2011 17:18:12 +0100 Subject: [PATCH] Give numeric options the value 0 if a non-numeric text is entered (one more place). 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 ecfe022..8cc231a 100644 --- 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) { -- 1.7.0.4