1
0
mirror of https://github.com/OgelGames/fakelib.git synced 2025-05-07 03:30:38 +02:00

check list size is greater than zero

This commit is contained in:
OgelGames 2024-05-19 15:24:43 +10:00
parent 8f16ad9dd9
commit 3094965807

@ -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()