diff --git a/lib/src/asn1/asn1_utils.cc b/lib/src/asn1/asn1_utils.cc index eb446414c..d9b1da4d1 100644 --- a/lib/src/asn1/asn1_utils.cc +++ b/lib/src/asn1/asn1_utils.cc @@ -106,7 +106,7 @@ int bit_ref::distance_bytes() const SRSASN_CODE bit_ref::pack(uint32_t val, uint32_t n_bits) { - if (n_bits > 32) { + if (n_bits >= 32) { srsasn_log_print(LOG_LEVEL_ERROR, "This method only supports packing up to 32 bits\n"); return SRSASN_ERROR_ENCODE_FAIL; } diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 9118af272..c72d5e346 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -2446,7 +2446,7 @@ void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_ srslte_cell_t scell = {}; uint32_t earfcn = 0; - if (phy != nullptr) { + if (phy == nullptr) { rrc_log->info("RRC not initialized. Skipping PHY config.\n"); return; }