nLen initialization fixed

pull/28/head
aryajur 2020-08-22 22:25:28 -07:00
parent 32a59c89b0
commit f521e4ac03
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ local function encode_table(val, stack)
-- Check whether to treat as a array or object
local array = true
local length = 0
local nLen
local nLen = 0
for k,v in pairs(val) do
if (type(k) ~= "number" or k<=0) and not (k == "n" and type(v) == "number") then
array = nil