mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix off-by-one error in string:split
implementation.
This commit is contained in:
parent
3bdf3df223
commit
00bca11f59
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user