diff --git a/P25RX.cpp b/P25RX.cpp index e8c5e4e..61d562a 100644 --- a/P25RX.cpp +++ b/P25RX.cpp @@ -182,8 +182,7 @@ void CP25RX::processHdr(q15_t sample) } DEBUG4("P25RX, sync position in HDR, pos/min/max", m_syncPtr, m_minSyncPtr, m_maxSyncPtr); if (isSync) { - // XXX this is possibly wrong - uint16_t ptr = m_syncPtr + P25_LDU_FRAME_LENGTH_SAMPLES - P25_HDR_FRAME_LENGTH_SAMPLES - P25_SYNC_LENGTH_SAMPLES + 1U; + uint16_t ptr = m_syncPtr + P25_LDU_FRAME_LENGTH_SAMPLES - P25_HDR_FRAME_LENGTH_SAMPLES - P25_SYNC_LENGTH_SAMPLES - 1U; if (ptr >= P25_LDU_FRAME_LENGTH_SAMPLES) ptr -= P25_LDU_FRAME_LENGTH_SAMPLES;