From bc01ad7098cbb3dc8cd03ba6f20d6b854f40ac4a Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Wed, 29 Dec 2021 12:08:20 +0100 Subject: [PATCH] Fixed overflow when using max upgrades, closes #1 --- .../functionalstorage/inventory/BigInventoryHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/buuz135/functionalstorage/inventory/BigInventoryHandler.java b/src/main/java/com/buuz135/functionalstorage/inventory/BigInventoryHandler.java index ba0a09b..49bf12e 100644 --- a/src/main/java/com/buuz135/functionalstorage/inventory/BigInventoryHandler.java +++ b/src/main/java/com/buuz135/functionalstorage/inventory/BigInventoryHandler.java @@ -91,7 +91,7 @@ public abstract class BigInventoryHandler implements IItemHandler, INBTSerializa @Override public int getSlotLimit(int slot) { if (hasDowngrade()) return 64; - return Math.min(Integer.MAX_VALUE, type.getSlotAmount() * getMultiplier()); + return (int) Math.min(Integer.MAX_VALUE, type.getSlotAmount() * (long) getMultiplier()); } @Override