1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-04 11:27:56 +00:00

Fix off-by-1 error in generic inventory's getItemLimit() (#1131)

This commit is contained in:
heap-underflow
2022-07-08 03:44:13 -04:00
committed by GitHub
parent be3a960273
commit 4cfd0a2d1c

View File

@@ -166,7 +166,7 @@ public class InventoryMethods implements GenericPeripheral
public static int getItemLimit( IItemHandler inventory, int slot ) throws LuaException
{
assertBetween( slot, 1, inventory.getSlots(), "Slot out of range (%s)" );
return inventory.getSlotLimit( slot );
return inventory.getSlotLimit( slot - 1 );
}
/**