mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix off-by-one error in string:split
implementation.
This commit is contained in:
parent
3bdf3df223
commit
00bca11f59
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern)
|
||||||
table_insert(items, s)
|
table_insert(items, s)
|
||||||
end
|
end
|
||||||
pos = npe + 1
|
pos = npe + 1
|
||||||
until (max_splits == 0) or (pos > len)
|
until (max_splits == 0) or (pos > (len + 1))
|
||||||
return items
|
return items
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue