fixed FPE in PUSCH UCI decoding

master
Ismael Gomez 8 years ago
parent cea68bf2f2
commit 238818f1d3

@ -299,8 +299,10 @@ int decode_cqi_long(srslte_uci_cqi_pusch_t *q, int16_t *q_bits, uint32_t Q,
// Set viterbi normalization based on amplitude
int16_t max = srslte_vec_max_abs_star_si(q->encoded_cqi_s, 3 * (nof_bits + 8));
if (max != 0) {
if (abs(max) > 100) {
srslte_viterbi_set_gain_quant_s(&q->viterbi, (float) abs(max)/36);
} else {
srslte_viterbi_set_gain_quant_s(&q->viterbi, 1);
}
DEBUG("cconv_rx=", 0);
if (SRSLTE_VERBOSE_ISDEBUG()) {

Loading…
Cancel
Save