diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-01 18:04:15 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-01 18:04:15 +0000 |
commit | ad4b0d0b8e32e61798ade9c256f850e8f96575f3 (patch) | |
tree | 3a6a97681d3cd91fbfb5047db5256a1c28373546 /src/equipment.cpp | |
parent | 9dd496ef1a395cada1f7fec08d4785728b2602d2 (diff) | |
download | mana-ad4b0d0b8e32e61798ade9c256f850e8f96575f3.tar.gz mana-ad4b0d0b8e32e61798ade9c256f850e8f96575f3.tar.bz2 mana-ad4b0d0b8e32e61798ade9c256f850e8f96575f3.tar.xz mana-ad4b0d0b8e32e61798ade9c256f850e8f96575f3.zip |
Possible fix for the arrow crashing bug. Confirmation needed.
Diffstat (limited to 'src/equipment.cpp')
-rw-r--r-- | src/equipment.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/equipment.cpp b/src/equipment.cpp index 491aff0c..9a87c6b5 100644 --- a/src/equipment.cpp +++ b/src/equipment.cpp @@ -45,7 +45,8 @@ Equipment::removeEquipment(Item *item) void Equipment::removeEquipment(int index) { - mEquipment[index] = 0; + if (index >= 0 && index < EQUIPMENT_SIZE) + mEquipment[index] = 0; } void Equipment::setEquipment(int index, Item *item) |