Commit cf5dafe7 authored by Thomas Schlichter's avatar Thomas Schlichter

use only one memcpy() in case "start_re + nb_re == ofdm_symbol_size" in...

use only one memcpy() in case "start_re + nb_re == ofdm_symbol_size" in nr_ulsch_demodulation.c and nr_dlsch_demodulation.c
parent 49196f3c
......@@ -356,7 +356,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
if (is_dmrs_symbol == 0) {
//
//rxF[ ((start_re + re)*2) % (frame_parms->ofdm_symbol_size*2)]);
if (start_re + nb_re_pusch < frame_parms->ofdm_symbol_size) {
if (start_re + nb_re_pusch <= frame_parms->ofdm_symbol_size) {
memcpy1((void*)rxF_ext,
(void*)&rxF[start_re*2],
nb_re_pusch*sizeof(int32_t));
......
......@@ -2017,7 +2017,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
int32_t *rxF = &rxdataF[aarx][symbol * frame_parms->ofdm_symbol_size];
if (pilots == 0) { //data symbol only
if (start_re + nb_rb_pdsch * NR_NB_SC_PER_RB < frame_parms->ofdm_symbol_size) {
if (start_re + nb_rb_pdsch * NR_NB_SC_PER_RB <= frame_parms->ofdm_symbol_size) {
memcpy((void*)rxF_ext, (void*)&rxF[start_re], nb_rb_pdsch * NR_NB_SC_PER_RB * sizeof(int32_t));
} else {
int neg_length = frame_parms->ofdm_symbol_size - start_re;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment