mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-24 16:36:03 +00:00
make utils.split return empty set on nil values
previously it returned a "nil" string
This commit is contained in:
parent
64b90042c4
commit
40ff1ec986
@ -8,7 +8,7 @@ function utils.trim(s)
|
||||
end
|
||||
|
||||
function utils.split(s)
|
||||
return tostring(s):gmatch("[^%s,][^,]*")
|
||||
return tostring(s or ""):gmatch("[^%s,][^,]*")
|
||||
end
|
||||
|
||||
function utils.check_key(val, key, tag, convert_spaces)
|
||||
|
Loading…
x
Reference in New Issue
Block a user