Skip to content

Commit

Permalink
RuleSet.cpp: Fix formatting to match CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork authored and radosroka committed Jun 6, 2024
1 parent df39b3c commit 3c01ba3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Library/public/usbguard/RuleSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ namespace usbguard
uint32_t RuleSet::assignID()
{
const auto next_id = _id_next + 1;

if (next_id >= Rule::LastID) {
throw std::out_of_range("Rule ID too high");
}

_id_next = next_id;
return next_id - 1;
}
Expand Down

0 comments on commit 3c01ba3

Please sign in to comment.