# HG changeset patch # User Kim Alvefur # Date 1537711873 -7200 # Node ID 009dad867e521b6702c3c64e3ab9178b5c16e159 # Parent 368b092bf4bf24b334f510d7d8192931e562917a util.serialization: Stricter type check diff -r 368b092bf4bf -r 009dad867e52 util/serialization.lua --- a/util/serialization.lua Sat Sep 22 16:03:50 2018 +0200 +++ b/util/serialization.lua Sun Sep 23 16:11:13 2018 +0200 @@ -142,7 +142,7 @@ 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