From d9529a3a8fe044c50e3650dee1812dd59fd54488 Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 6 May 2020 18:50:52 +0200 Subject: [PATCH] Fix for 1480071. --- lib/src/phy/phch/prach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/phch/prach.c b/lib/src/phy/phch/prach.c index 371283046..ecdbe93cb 100644 --- a/lib/src/phy/phch/prach.c +++ b/lib/src/phy/phch/prach.c @@ -134,8 +134,8 @@ uint32_t srslte_prach_f_ra_tdd(uint32_t config_idx, uint32_t n_rb_ul) { - if (config_idx >= 64 && tdd_ul_dl_config >= 7) { - ERROR("PRACH: Invalid parmeters config_idx=%d, tdd_ul_config=%d\n", config_idx, tdd_ul_dl_config); + if (config_idx >= 64 || tdd_ul_dl_config >= 7) { + ERROR("PRACH: Invalid parameters config_idx=%d, tdd_ul_config=%d\n", config_idx, tdd_ul_dl_config); return 0; } uint32_t f_ra = prach_tdd_loc_table[config_idx][tdd_ul_dl_config].elems[prach_idx].f;