aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/core/util.lua2
-rw-r--r--src/luarocks/core/util.tl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/core/util.lua b/src/luarocks/core/util.lua
index fae8625a..f72f1ec6 100644
--- a/src/luarocks/core/util.lua
+++ b/src/luarocks/core/util.lua
@@ -192,7 +192,7 @@ function util.split_string(str, delim, maxNb)
192 for part, pos in string.gmatch(str, pat) do 192 for part, pos in string.gmatch(str, pat) do
193 nb = nb + 1 193 nb = nb + 1
194 result[nb] = part 194 result[nb] = part
195 lastPos = math.tointeger(tonumber(pos)) 195 lastPos = tonumber(pos)
196 if nb == maxNb then break end 196 if nb == maxNb then break end
197 end 197 end
198 198
diff --git a/src/luarocks/core/util.tl b/src/luarocks/core/util.tl
index 9b23c083..ffdb6bc4 100644
--- a/src/luarocks/core/util.tl
+++ b/src/luarocks/core/util.tl
@@ -192,7 +192,7 @@ function util.split_string(str: string, delim: string, maxNb?: number): {string}
192 for part, pos in string.gmatch(str, pat) do 192 for part, pos in string.gmatch(str, pat) do
193 nb = nb + 1 193 nb = nb + 1
194 result[nb] = part 194 result[nb] = part
195 lastPos = math.tointeger(tonumber(pos)) 195 lastPos = tonumber(pos) as integer
196 if nb == maxNb then break end 196 if nb == maxNb then break end
197 end 197 end
198 -- Handle the last field 198 -- Handle the last field