fix use of arg in ltn12

This commit is contained in:
Pierre Chapuis 2012-09-17 18:30:26 +02:00
parent a402222464
commit ffddaf4a2e

View File

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