Cast arg as string in trim() and split()
This commit is contained in:
parent
1f124ff2ee
commit
3acb30e1ca
1 changed files with 2 additions and 2 deletions
|
@ -21,11 +21,11 @@ local wml_actions = wesnoth.wml_actions
|
|||
|
||||
local function trim(s)
|
||||
-- use (f(a)) to get first argument
|
||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||
return (tostring(s):gsub("^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
local function split(s)
|
||||
return s:gmatch("[^%s,][^,]*")
|
||||
return tostring(s):gmatch("[^%s,][^,]*")
|
||||
end
|
||||
|
||||
local function optional_side_filter(cfg, key_name, filter_name)
|
||||
|
|
Loading…
Add table
Reference in a new issue