summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/equipment.h2
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.