diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-21 23:45:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-21 23:48:21 +0300 |
commit | 45d47319615c308da55e1310799eaf9a066118e1 (patch) | |
tree | 323c2fcb47483eedeca14ef3b965ef58e7ec0544 | |
parent | 4a78b94dce29af07e63c113463dcbbb81d6e0d6d (diff) | |
download | plus-45d47319615c308da55e1310799eaf9a066118e1.tar.gz plus-45d47319615c308da55e1310799eaf9a066118e1.tar.bz2 plus-45d47319615c308da55e1310799eaf9a066118e1.tar.xz plus-45d47319615c308da55e1310799eaf9a066118e1.zip |
Add missing checks in item slots.
-rw-r--r-- | src/net/ea/equipbackend.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/ea/equipbackend.h b/src/net/ea/equipbackend.h index fb06cf7e2..ef4426a52 100644 --- a/src/net/ea/equipbackend.h +++ b/src/net/ea/equipbackend.h @@ -80,6 +80,9 @@ class EquipBackend final : public Equipment::Backend if (!inv) return; + if (index < 0 || index >= EQUIPMENT_SIZE) + return; + // Unequip existing item Item *item = inv->getItem(mEquipment[index]); |