diff options
Diffstat (limited to 'xmake/core/base/string.lua')
| -rw-r--r-- | xmake/core/base/string.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/string.lua b/xmake/core/base/string.lua index 625678c6c..2b89f6550 100644 --- a/xmake/core/base/string.lua +++ b/xmake/core/base/string.lua @@ -80,6 +80,9 @@ end -- ("1.2.3.4.5"):split('%.', {limit = 3}) => 1, 2, 3.4.5 -- function string:split(delimiter, opt) + if #delimiter == 0 then + os.raise("string.split(%s, \"\") use empty delimiter", self) + end local limit, plain, strict if opt then limit = opt.limit |
