From d08a7c94eb35e640638db964853ccc11f6ecf111 Mon Sep 17 00:00:00 2001 From: thegrb93 Date: Sat, 12 Dec 2020 16:03:24 -0500 Subject: [PATCH] Fix self referential table encoding issue. Fixes: #280 Fixes: #305 (#342) --- lua/advdupe2/sh_codec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/advdupe2/sh_codec.lua b/lua/advdupe2/sh_codec.lua index aa3cb33..13ae05b 100644 --- a/lua/advdupe2/sh_codec.lua +++ b/lua/advdupe2/sh_codec.lua @@ -90,8 +90,8 @@ local len local tables,tablesLookup enc[TYPE_TABLE] = function(obj) --table - tables = tables + 1 if not tablesLookup[obj] then + tables = tables + 1 tablesLookup[obj] = tables else buff:WriteByte(247)