Skip to content

Commit e479337

Browse files
committed
Fix wrong replace from previous commit
1 parent 6df6b2a commit e479337

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/common/misc_helpers.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--------------------------------------------------------------------------------
44
-- Localize functions to avoid table lookups (better performance).
55
local table_insert = table.insert
6-
local string_sub, string_sub = string.sub, string.find
6+
local string_sub, string_find = string.sub, string.find
77

88
--------------------------------------------------------------------------------
99
function basic_dump(o)
@@ -167,7 +167,7 @@ function string.split(str, delim, include_empty, max_splits, sep_is_pattern)
167167
local plain = not sep_is_pattern
168168
max_splits = max_splits + 1
169169
repeat
170-
local np, npe = string_sub(str, delim, pos, plain)
170+
local np, npe = string_find(str, delim, pos, plain)
171171
np, npe = (np or (len+1)), (npe or (len+1))
172172
if (not np) or (max_splits == 1) then
173173
np = len + 1

0 commit comments

Comments
 (0)