(Re)spawn players within 'mapgen_limit'
[oweals/minetest.git] / builtin / common / serialize.lua
index b2165648ed472255ee281bdaccd851420a1df56c..692ddd5f0f132c37bca0967f947ea87f9e56a64e 100644 (file)
@@ -186,6 +186,10 @@ local safe_env = {
 }
 
 function core.deserialize(str, safe)
+       if type(str) ~= "string" then
+               return nil, "Cannot deserialize type '"..type(str)
+                       .."'. Argument must be a string."
+       end
        if str:byte(1) == 0x1B then
                return nil, "Bytecode prohibited"
        end