Skip to content
Snippets Groups Projects
Commit e479337c authored by est31's avatar est31
Browse files

Fix wrong replace from previous commit

parent 6df6b2a0
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Localize functions to avoid table lookups (better performance). -- Localize functions to avoid table lookups (better performance).
local table_insert = table.insert local table_insert = table.insert
local string_sub, string_sub = string.sub, string.find local string_sub, string_find = string.sub, string.find
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
function basic_dump(o) function basic_dump(o)
...@@ -167,7 +167,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern) ...@@ -167,7 +167,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern)
local plain = not sep_is_pattern local plain = not sep_is_pattern
max_splits = max_splits + 1 max_splits = max_splits + 1
repeat repeat
local np, npe = string_sub(str, delim, pos, plain) local np, npe = string_find(str, delim, pos, plain)
np, npe = (np or (len+1)), (npe or (len+1)) np, npe = (np or (len+1)), (npe or (len+1))
if (not np) or (max_splits == 1) then if (not np) or (max_splits == 1) then
np = len + 1 np = len + 1
......
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