1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-18 22:28:06 +00:00

parameter validation

This commit is contained in:
kepler155c@gmail.com
2018-10-27 21:34:34 -04:00
parent 7220b372bd
commit b564b1e9be
2 changed files with 2 additions and 1 deletions

View File

@@ -489,6 +489,7 @@ function Util.insertString(str, istr, pos)
end
function Util.split(str, pattern)
if not str then error('Util:split: invalid parameters', 2) end
pattern = pattern or "(.-)\n"
local t = {}
local function helper(line) table.insert(t, line) return "" end