diff options
author | Diego MartÃnez <kaeza@users.noreply.github.com> | 2015-01-04 20:10:25 -0300 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-01-04 23:33:55 -0500 |
commit | 00bca11f5988cfe7ce019c15c056ae258c254023 (patch) | |
tree | cb025155fabecd35b7efc295733aedb6b3165da3 /builtin/common | |
parent | 3bdf3df22367ded04e3a0599f85262e3b538e6ac (diff) | |
download | minetest-00bca11f5988cfe7ce019c15c056ae258c254023.tar.gz minetest-00bca11f5988cfe7ce019c15c056ae258c254023.tar.bz2 minetest-00bca11f5988cfe7ce019c15c056ae258c254023.zip |
Fix off-by-one error in `string:split` implementation.
Diffstat (limited to 'builtin/common')
-rw-r--r-- | builtin/common/misc_helpers.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 2ee990e5c..a86631e1d 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -178,7 +178,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern) table_insert(items, s) end pos = npe + 1 - until (max_splits == 0) or (pos > len) + until (max_splits == 0) or (pos > (len + 1)) return items end |