# HG changeset patch # User Kim Alvefur # Date 1532816261 -7200 # Node ID 69bc3144c2b7665b6cf8cd853015720de9fc213d # Parent e1db06a0cc6b2e917d732edbc1afc7b83e408372 util.serialization: Tighten up type checks diff -r e1db06a0cc6b -r 69bc3144c2b7 util/serialization.lua --- a/util/serialization.lua Thu Jul 26 00:17:23 2018 +0200 +++ b/util/serialization.lua Sun Jul 29 00:17:41 2018 +0200 @@ -151,9 +151,9 @@ elseif mt then tag = mt.__type; end - if fr then + if type(fr) == "function" then t = fr(t); - if tag then + if type(tag) == "string" then o[l], l = tag, l + 1; end end