Skip to content

Commit

Permalink
GateControlList: Fixed parsing GCL, the last duration should be added…
Browse files Browse the repository at this point in the history
… to the first if the length is odd.
  • Loading branch information
levy committed Oct 18, 2023
1 parent 881fbe6 commit 036740e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inet/queueing/gate/GateControlList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void GateControlList::parseGcl()
if (durations->size() % 2 != 0)
durations->add(cValue(currentDuration[i], "s"));
else {
durations->set(i, cValue(durations->get(i).doubleValueInUnit("s") + currentDuration[i], "s"));
durations->set(0, cValue(durations->get(0).doubleValueInUnit("s") + currentDuration[i], "s"));
offsets[i] = currentDuration[i];
}
}
Expand Down

0 comments on commit 036740e

Please sign in to comment.