diff options
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 |
