mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-27 04:48:21 +01:00
fix use of arg in ltn12
This commit is contained in:
parent
a402222464
commit
ffddaf4a2e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user