diff options
-rw-r--r-- | host/lib/utils/gain_group.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp index 46fa8a240..50edf2515 100644 --- a/host/lib/utils/gain_group.cpp +++ b/host/lib/utils/gain_group.cpp @@ -67,8 +67,11 @@ public: overall_min += range.start(); overall_max += range.stop(); //the overall step is the min (zero is invalid, first run) - if (overall_step == 0) overall_step = range.step(); - overall_step = std::min(overall_step, range.step()); + if (overall_step == 0){ + overall_step = range.step(); + }else if (range.step()){ + overall_step = std::min(overall_step, range.step()); + } } return gain_range_t(overall_min, overall_max, overall_step); } |