Fixed bug where item data initialization would read data outside bounds

This commit is contained in:
Collin Smith 2020-07-16 19:31:08 -07:00
parent 01575d1c04
commit b62d397c2e

View File

@ -286,7 +286,7 @@ public class ItemData {
IntArray inventoryItems = getStore(StoreLoc.INVENTORY);
cache = inventoryItems.items;
for (int i = 0, s = cache.length, j; i < s; i++) {
for (int i = 0, s = inventoryItems.size, j; i < s; i++) {
j = cache[i];
if (j == INVALID_ITEM) continue;
Item item = itemData.get(j);