From ffddaf4a2e2c33f805ee072c6f78fe987fd35f87 Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Mon, 17 Sep 2012 18:30:26 +0200 Subject: [PATCH] fix use of arg in ltn12 --- src/ltn12.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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