Merge pull request #24 from catwell/tracking-diego

fix use of arg in ltn12
This commit is contained in:
Diego Nehab 2012-12-10 09:25:21 -08:00
commit 114080d835

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