From 05f16b4a2f165d5b84aceb6c1082375f7b769d93 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Sep 2018 16:11:13 +0200 Subject: util.serialization: Stricter type check --- util/serialization.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/serialization.lua b/util/serialization.lua index 960794f2..5a8eef81 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -142,7 +142,7 @@ local function new(opt) if freeze then -- opportunity to do pre-serialization local mt = getmetatable(t); - local fr = (freeze ~= true and freeze[mt]); + local fr = (type(freeze) == "table" and freeze[mt]); local mf = mt and mt.__freeze; local tag; if type(fr) == "string" then -- cgit v1.2.3