1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@ public static int size( IItemHandler inventory )
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 );
}
/**