forked from mirror/openmw-tes3mp
Add missing OOB slot check to InventoryStore.
This commit is contained in:
parent
ef1a1125e0
commit
2ce2e8a1e7
1 changed files with 3 additions and 0 deletions
|
@ -523,6 +523,9 @@ int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor
|
|||
|
||||
MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, const MWWorld::Ptr& actor)
|
||||
{
|
||||
if (slot<0 || slot>=static_cast<int> (mSlots.size()))
|
||||
throw std::runtime_error ("slot number out of range");
|
||||
|
||||
ContainerStoreIterator it = mSlots[slot];
|
||||
|
||||
if (it != end())
|
||||
|
|
Loading…
Reference in a new issue