From 0bc51aa082ba58d84d7a703eeb5d3c411e9ee4ec Mon Sep 17 00:00:00 2001 From: Levente Meszaros Date: Tue, 26 Mar 2024 12:27:14 +0100 Subject: [PATCH] GateControlList: Fixed discussion #1139. --- src/inet/queueing/gate/GateControlList.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inet/queueing/gate/GateControlList.cc b/src/inet/queueing/gate/GateControlList.cc index af5886ad80b..36a13185b08 100644 --- a/src/inet/queueing/gate/GateControlList.cc +++ b/src/inet/queueing/gate/GateControlList.cc @@ -63,7 +63,7 @@ void GateControlList::parseGcl() auto durations = gateDurations.at(i); if (durations->size() % 2 != 0) durations->add(cValue(currentDuration[i], "s")); - else { + else if (durations->size() != 0) { durations->set(0, cValue(durations->get(0).doubleValueInUnit("s") + currentDuration[i], "s")); offsets[i] = currentDuration[i]; }