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