diff --git a/lib/src/phy/phch/prach.c b/lib/src/phy/phch/prach.c index 0e3534c89..371283046 100644 --- a/lib/src/phy/phch/prach.c +++ b/lib/src/phy/phch/prach.c @@ -468,7 +468,7 @@ int srslte_prach_set_cell_(srslte_prach_t* p, p->N_roots = 0; srslte_prach_gen_seqs(p); // Ensure num_ra_preambles is valid, if not assign default value - if (p->num_ra_preambles < 4 || p->num_ra_preambles > 64) { + if (p->num_ra_preambles < 4 || p->num_ra_preambles > p->N_roots) { p->num_ra_preambles = p->N_roots; } // Generate sequence FFTs