From fffe9531c360434cbd6cccb269146b5f7bd17dfd Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 22 Jul 2025 13:51:05 +0200 Subject: [PATCH] add assert in a case of wrong gNB configuration file --- common/utils/nr/nr_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 7875fe546a..7954db7d54 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -1160,6 +1160,7 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB, const int ssb_offset_point_a = ((scaled_abs_diff / 12) - 10) * scaling; // Offset to point A needs to be divisible by scaling AssertFatal(ssb_offset_point_a % scaling == 0, "PRB offset %d not valid for scs %d\n", ssb_offset_point_a, ssbSubcarrierSpacing); + AssertFatal(ssb_offset_point_a >= 0, "ssb offset is negative %d for scs %d\n", ssb_offset_point_a, ssbSubcarrierSpacing); return ssb_offset_point_a; }