summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-21 23:45:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-21 23:48:21 +0300
commit45d47319615c308da55e1310799eaf9a066118e1 (patch)
tree323c2fcb47483eedeca14ef3b965ef58e7ec0544 /src/net/ea
parent4a78b94dce29af07e63c113463dcbbb81d6e0d6d (diff)
downloadmv-45d47319615c308da55e1310799eaf9a066118e1.tar.gz
mv-45d47319615c308da55e1310799eaf9a066118e1.tar.bz2
mv-45d47319615c308da55e1310799eaf9a066118e1.tar.xz
mv-45d47319615c308da55e1310799eaf9a066118e1.zip
Add missing checks in item slots.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/equipbackend.h3
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]);