Update 'Controller/CropController.lua'
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user