diff --git a/Controller/CropController.lua b/Controller/CropController.lua index 3fcc698..d9967e4 100644 --- a/Controller/CropController.lua +++ b/Controller/CropController.lua @@ -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