aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Graham-Cumming <jgc@cloudflare.com>2014-01-02 07:46:33 -0800
committerJohn Graham-Cumming <jgc@cloudflare.com>2014-01-02 07:46:33 -0800
commit7603760017702ea02deca338fc4efc51f44929f3 (patch)
treef30da880df25d4846ceeb7ed7286e526a205c957 /lib
parent6a1de2ae1897fa28cac9dc05bcdec8109bcfd286 (diff)
downloadlua-resty-cookie-7603760017702ea02deca338fc4efc51f44929f3.tar.gz
lua-resty-cookie-7603760017702ea02deca338fc4efc51f44929f3.tar.bz2
lua-resty-cookie-7603760017702ea02deca338fc4efc51f44929f3.zip
Fix use of table.new(); parameters are not optional.
The LuaJIT 2.1 table.new() function has two parameters: narr and nrec. It is not possible to omit either. The code was assuming that this was possible.
Diffstat (limited to 'lib')
-rw-r--r--lib/resty/cookie.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/resty/cookie.lua b/lib/resty/cookie.lua
index 96c43fc..ce4b7f4 100644
--- a/lib/resty/cookie.lua
+++ b/lib/resty/cookie.lua
@@ -47,7 +47,7 @@ local function get_cookie_table(text_cookie)
end
end
- local cookie_table = new_tab(n + 1)
+ local cookie_table = new_tab(0, n + 1)
local state = EXPECT_SP
local i = 1