blob: a94ee3cdd11295d106688a6493e6f9700ba7a822 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
diff --git a/src/luarocks/tools/tar.lua b/src/luarocks/tools/tar.lua
index 6db1334a..49139615 100644
--- a/src/luarocks/tools/tar.lua
+++ b/src/luarocks/tools/tar.lua
@@ -51,11 +51,11 @@ local function octal_to_number(octal)
local number = 0
octal = octal:gsub("%s", "")
for i = #octal, 1, -1 do
- local digit = math.tointeger(octal:sub(i, i))
+ local digit = tonumber(octal:sub(i, i))
if not digit then
break
end
- number = number + (digit * math.tointeger(8 ^ exp))
+ number = number + (digit * (8 ^ exp))
exp = exp + 1
end
return number
|