From 9357769efb985a07adb9ae92607ff5be6e8f8bbc Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Sun, 25 Jan 2009 00:44:03 +0000 Subject: [PATCH] + Framework: handle gridlines with absurd indices properly --- src/modules_dsp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules_dsp.cpp b/src/modules_dsp.cpp index 2cdc390..a7e5387 100644 --- a/src/modules_dsp.cpp +++ b/src/modules_dsp.cpp @@ -95,6 +95,8 @@ static bool get_freq_gridline(int subindex, float &pos, bool &vertical, std::str } subindex -= 28; } + if (subindex >= 32) + return false; float gain = 16.0 / (1 << subindex); pos = dB_grid(gain); if (pos < -1) -- 2.11.4.GIT