diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-28 21:22:10 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-28 21:22:10 -0700 |
commit | 4aeedb10f22d0dc307c9f733d0f1c79b70b9c200 (patch) | |
tree | cc507e2bc5c0616658190cf0d657eb004ba6117e | |
parent | b5ef3811e697a6a4dc963399424115c53502a4e5 (diff) | |
download | mana-4aeedb10f22d0dc307c9f733d0f1c79b70b9c200.tar.gz mana-4aeedb10f22d0dc307c9f733d0f1c79b70b9c200.tar.bz2 mana-4aeedb10f22d0dc307c9f733d0f1c79b70b9c200.tar.xz mana-4aeedb10f22d0dc307c9f733d0f1c79b70b9c200.zip |
Sanity-check index for Equipment::removeEquipment(int)
-rw-r--r-- | src/equipment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/equipment.h b/src/equipment.h index 28a96baa..e6145d12 100644 --- a/src/equipment.h +++ b/src/equipment.h @@ -48,7 +48,7 @@ class Equipment /** * Remove equipment from the given slot. */ - void removeEquipment(int index) { mEquipment[index] = 0; } + void removeEquipment(int index) { if (index >= 0 && index < EQUIPMENT_SIZE) mEquipment[index] = 0; } /** * Returns the item used in the arrow slot. |