fix(menumodel): fix for loop

This commit is contained in:
Kazhnuz 2020-11-29 12:43:52 +01:00
parent b1cd9a6683
commit a3e2da3972

View file

@ -83,8 +83,9 @@ function MenuModel:getList(first, lenght)
local first = first or 1
local lenght = lenght or #self.list
lenght = math.min(lenght, (#self.list + 1 - first))
local last = (first + lenght - 1)
for i = first, lenght do
for i = first, (last) do
table.insert(listWidget, self.list[i])
end