projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bdf3df
)
Fix off-by-one error in `string:split` implementation.
author
Diego MartÃnez
<kaeza@users.noreply.github.com>
Sun, 4 Jan 2015 23:10:25 +0000
(20:10 -0300)
committer
kwolekr
<kwolekr@minetest.net>
Mon, 5 Jan 2015 04:33:55 +0000
(23:33 -0500)
builtin/common/misc_helpers.lua
patch
|
blob
|
history
diff --git
a/builtin/common/misc_helpers.lua
b/builtin/common/misc_helpers.lua
index 2ee990e5c0cdaa3b455cab746d01875b35cc03c4..a86631e1dc9b52c104d65881e5578def6ef14ab1 100644
(file)
--- 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