Update 'Controller/CropController.lua'

This commit is contained in:
manuel 2023-01-12 08:19:20 +00:00
parent c84ad1853f
commit 11f8062510

View File

@ -50,12 +50,20 @@ function CropController:toArray(str)
local arr = {}
while(type(comma)=="number") do
arr[#arr+1] = str:sub(1, comma-1)
local latest = tonumber(arr[#arr])
if(latest ~= nil) then
arr[#arr] = latest
end
str = str:sub(comma + 1, len)
len = str:len()
comma = str:find(",")
end
if(str ~= "") then
arr[#arr+1] = str
local latest = tonumber(arr[#arr])
if(latest ~= nil) then
arr[#arr] = latest
end
end
return arr
end