From 2fa2fc9bf145e7cabacdab6129cee7cdf0e99976 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 29 Aug 2026 18:15:48 -0400 Subject: [PATCH] Fixed potential crash --- core/src/mindustry/type/ItemSeq.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/mindustry/type/ItemSeq.java b/core/src/mindustry/type/ItemSeq.java index 61bcc37e3a..7125f47901 100644 --- a/core/src/mindustry/type/ItemSeq.java +++ b/core/src/mindustry/type/ItemSeq.java @@ -124,6 +124,7 @@ public class ItemSeq implements Iterable, JsonSerializable{ } public void add(Item item, int amount){ + if(item.id >= values.length) return; //content patches can change ID length values[item.id] += amount; total += amount; }