From 4208bcf1f417da17b287ecf2360524f3189438b7 Mon Sep 17 00:00:00 2001 From: srcejon Date: Fri, 1 Dec 2023 11:52:55 +0000 Subject: [PATCH] Fix AirspyHF instant replay. --- plugins/samplesource/airspyhf/airspyhfinput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/samplesource/airspyhf/airspyhfinput.cpp b/plugins/samplesource/airspyhf/airspyhfinput.cpp index f1a81ab94..715b78e58 100644 --- a/plugins/samplesource/airspyhf/airspyhfinput.cpp +++ b/plugins/samplesource/airspyhf/airspyhfinput.cpp @@ -292,7 +292,8 @@ int AirspyHFInput::getSampleRate() const uint32_t AirspyHFInput::getSampleRateFromIndex(quint32 devSampleRateIndex) const { - int index; + int index = (int) devSampleRateIndex; + if (devSampleRateIndex >= m_sampleRates.size()) { index = m_sampleRates.size() - 1; }