safer_lua: fixing string.split issue for seperator value = ''

This commit is contained in:
Joachim Stolberg 2020-08-15 20:47:51 +02:00
parent 9a3097a3db
commit b78d62a7c3

@ -58,6 +58,7 @@ local BASE_ENV = {
sub = string.sub,
upper = string.upper,
split = function(str, separator, include_empty, max_splits, sep_is_pattern)
if separator == "" then separator = " " end
return safer_lua.Array(unpack(string.split(str, separator, include_empty, max_splits, sep_is_pattern)))
end,
trim = string.trim,