From 12e78a39cb4f8b09002867fe36347422d63ec858 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Feb 2016 19:07:43 +0000 Subject: [PATCH] Fix potential bug in YSF RX. --- YSFRX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YSFRX.cpp b/YSFRX.cpp index 98561a4..33452f7 100644 --- a/YSFRX.cpp +++ b/YSFRX.cpp @@ -547,12 +547,12 @@ const unsigned int K = 5U; bool CYSFRX::rxFICH(uint8_t* data, uint8_t* FICH) { - ::memset(m_metrics1, 0x00U, NUM_OF_STATES * sizeof(uint32_t)); + ::memset(m_metrics1, 0x00U, NUM_OF_STATES * sizeof(uint16_t)); + ::memset(m_metrics2, 0x00U, NUM_OF_STATES * sizeof(uint16_t)); m_oldMetrics = m_metrics1; m_newMetrics = m_metrics2; m_dp = m_decisions; - uint8_t m = 0U; // Deinterleave the FICH and send bits to the Viterbi decoder for (uint8_t i = 0U; i < 100U; i++) { uint8_t n = INTERLEAVE_TABLE_RX[i];