Skip to content

Commit

Permalink
Use the bounds-checked accessor for GetSlotUnit()
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Nov 13, 2021
1 parent 30aa73f commit 276e2db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit/unit_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void unit_manager::ReleaseUnit(CUnit *unit)

CUnit &unit_manager::GetSlotUnit(const int index) const
{
return *this->unit_slots[index];
return *this->unit_slots.at(index);
}

unsigned int unit_manager::GetUsedSlotCount() const
Expand Down

0 comments on commit 276e2db

Please sign in to comment.