summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/menus.c b/menus.c
index 840211e..a92d471 100644
--- a/menus.c
+++ b/menus.c
@@ -2168,7 +2168,18 @@ static int Submenu_Mult_Value(float mult_by)
channel=Submenu_Numeric_Parameter%100;
- new_value = Submenu_Value * mult_by;
+ if (fabs(Submenu_Value) < smallest_allowed_number) {
+ printf ("small\n");
+ if (Submenu_Value < 0.0) {
+ new_value = -smallest_allowed_number * mult_by;
+ } else {
+ new_value = smallest_allowed_number * mult_by;
+ }
+ } else {
+ new_value = Submenu_Value * mult_by;
+ }
+
+ g_print_debug("chan %d, Submenu_Value %e, mult_by %e, new_value %e\n", channel, Submenu_Value, mult_by, new_value);
switch (Submenu_Numeric_Parameter-channel) {
case Show_frequency: