Software /
code /
prosody
Changeset
9341:009dad867e52
util.serialization: Stricter type check
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 23 Sep 2018 16:11:13 +0200 |
parents | 9340:368b092bf4bf |
children | 9342:83e4596c2824 |
files | util/serialization.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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