diff --git a/src/ltn12.lua b/src/ltn12.lua index b7f9a21..d999e93 100644 --- a/src/ltn12.lua +++ b/src/ltn12.lua @@ -37,7 +37,8 @@ end -- chains a bunch of filters together -- (thanks to Wim Couwenberg) function filter.chain(...) - local n = table.getn(arg) + local arg = {...} + local n = #arg local top, index = 1, 1 local retry = "" return function(chunk) @@ -185,6 +186,7 @@ end -- other, as if they were concatenated -- (thanks to Wim Couwenberg) function source.cat(...) + local arg = {...} local src = table.remove(arg, 1) return function() while src do