From 792d5890476d111e0f2ebb15a278ef50199391a0 Mon Sep 17 00:00:00 2001 From: Julia <78276563+Vlamonster@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:16:29 +0100 Subject: [PATCH] Fix overflow for large stack sizes in `storeInterfacePattern` (#146) Co-authored-by: Julia Dijkstra --- .../li/cil/oc/integration/appeng/DriverBlockInterface.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/li/cil/oc/integration/appeng/DriverBlockInterface.scala b/src/main/scala/li/cil/oc/integration/appeng/DriverBlockInterface.scala index 823cdb128b..69f3f50b56 100644 --- a/src/main/scala/li/cil/oc/integration/appeng/DriverBlockInterface.scala +++ b/src/main/scala/li/cil/oc/integration/appeng/DriverBlockInterface.scala @@ -116,6 +116,7 @@ object DriverBlockInterface extends DriverSidedTileEntity { throw new IllegalArgumentException("Invalid index!") val stackNBT = nbt.getCompoundTagAt(index) val stack = ItemStack.loadItemStackFromNBT(stackNBT) + stack.stackSize = 1; DatabaseAccess.withDatabase(node, args.checkString(2), database => { val slot = args.optSlot(database.data, 3, 0) database.setStackInSlot(slot, stack)