From 8e130d79829622cf5d09d95226e32799a5737100 Mon Sep 17 00:00:00 2001 From: V1K1NGbg Date: Tue, 23 Jul 2024 15:56:06 +0300 Subject: fix attempt 3 --- src/luarocks/core/util.lua | 2 +- src/luarocks/core/util.tl | 2 +- 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) for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part - lastPos = math.tointeger(pos) + lastPos = math.tointeger(tonumber(pos)) if nb == maxNb then break end end 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} for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part - lastPos = math.tointeger(pos) + lastPos = math.tointeger(tonumber(pos)) if nb == maxNb then break end end -- Handle the last field -- cgit v1.2.3-55-g6feb