diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ltn12.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 | |||
| 37 | -- chains a bunch of filters together | 37 | -- chains a bunch of filters together |
| 38 | -- (thanks to Wim Couwenberg) | 38 | -- (thanks to Wim Couwenberg) |
| 39 | function filter.chain(...) | 39 | function filter.chain(...) |
| 40 | local n = table.getn(arg) | 40 | local arg = {...} |
| 41 | local n = #arg | ||
| 41 | local top, index = 1, 1 | 42 | local top, index = 1, 1 |
| 42 | local retry = "" | 43 | local retry = "" |
| 43 | return function(chunk) | 44 | return function(chunk) |
| @@ -185,6 +186,7 @@ end | |||
| 185 | -- other, as if they were concatenated | 186 | -- other, as if they were concatenated |
| 186 | -- (thanks to Wim Couwenberg) | 187 | -- (thanks to Wim Couwenberg) |
| 187 | function source.cat(...) | 188 | function source.cat(...) |
| 189 | local arg = {...} | ||
| 188 | local src = table.remove(arg, 1) | 190 | local src = table.remove(arg, 1) |
| 189 | return function() | 191 | return function() |
| 190 | while src do | 192 | while src do |
