From 309496580708b17ebc3e5e74643789ba77431eb8 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Sun, 19 May 2024 15:24:43 +1000 Subject: [PATCH] check list size is greater than zero --- inventory.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory.lua b/inventory.lua index 6f14c19..69e6b4e 100644 --- a/inventory.lua +++ b/inventory.lua @@ -19,7 +19,7 @@ function fakelib.create_inventory(sizes) local lists = {} if type(sizes) == "table" then for listname, size in pairs(sizes) do - if type(listname) == "string" and type(size) == "number" then + if type(listname) == "string" and type(size) == "number" and size > 0 then local list = {} for i=1, size do list[i] = ItemStack()