1
0
zrcadlo https://github.com/luanti-org/luanti.git synchronizováno 2025-12-12 18:25:26 +01:00

minetest.deserialize: Throw error when argument not string (#5738)

Tento commit je obsažen v:
SmallJoker
2017-05-09 23:11:20 +02:00
odevzdal Loïc Blot
rodič 34c52d0ad7
revize 6945f807ab

Zobrazit soubor

@@ -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