aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV1K1NGbg <victor@ilchev.com>2024-07-23 15:56:06 +0300
committerV1K1NGbg <victor@ilchev.com>2024-08-05 20:49:17 +0300
commit8e130d79829622cf5d09d95226e32799a5737100 (patch)
treec99b34ed17d84a11c8b7ffd020f0434c3eaf87dd
parent43c5a899d41533af4c107004643b139ce0349d12 (diff)
downloadluarocks-8e130d79829622cf5d09d95226e32799a5737100.tar.gz
luarocks-8e130d79829622cf5d09d95226e32799a5737100.tar.bz2
luarocks-8e130d79829622cf5d09d95226e32799a5737100.zip
fix attempt 3
-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 b815a028..fae8625a 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(pos) 195 lastPos = math.tointeger(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 39862dcb..9b23c083 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(pos) 195 lastPos = math.tointeger(tonumber(pos))
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