mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 11:10:50 +03:00
Fixed potential crash
This commit is contained in:
@@ -124,6 +124,7 @@ public class ItemSeq implements Iterable<ItemStack>, 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user