Skip to content
Snippets Groups Projects
Commit 00bca11f authored by Diego Martínez's avatar Diego Martínez Committed by kwolekr
Browse files

Fix off-by-one error in `string:split` implementation.

parent 3bdf3df2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment