diff options
| author | V1K1NGbg <victor@ilchev.com> | 2024-07-23 15:56:06 +0300 |
|---|---|---|
| committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:49:17 +0300 |
| commit | 8e130d79829622cf5d09d95226e32799a5737100 (patch) | |
| tree | c99b34ed17d84a11c8b7ffd020f0434c3eaf87dd /src | |
| parent | 43c5a899d41533af4c107004643b139ce0349d12 (diff) | |
| download | luarocks-8e130d79829622cf5d09d95226e32799a5737100.tar.gz luarocks-8e130d79829622cf5d09d95226e32799a5737100.tar.bz2 luarocks-8e130d79829622cf5d09d95226e32799a5737100.zip | |
fix attempt 3
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/core/util.lua | 2 | ||||
| -rw-r--r-- | 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) | |||
| 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 |
