diff --git a/src/antenna/model/uniform-planar-array.cc b/src/antenna/model/uniform-planar-array.cc index eec7b33c8..5debed34a 100644 --- a/src/antenna/model/uniform-planar-array.cc +++ b/src/antenna/model/uniform-planar-array.cc @@ -359,7 +359,7 @@ UniformPlanarArray::ArrayIndexFromPortIndex(uint16_t portIndex, uint16_t subElem auto firstPolPortIdx = portIndex; auto polarizationOffset = 0; auto arraySize = GetNumHorizontalPorts() * GetNumVerticalPorts(); - if (firstPolPortIdx > arraySize) + if (firstPolPortIdx >= arraySize) { firstPolPortIdx = portIndex - arraySize; polarizationOffset = GetNumColumns() * GetNumRows();