diff options
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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: |