mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-07-01 23:30:21 +02:00
xpcall banned.
It blocks errors. The timeout relies on errors. I see a recipe for disaster...
This commit is contained in:
@ -341,18 +341,6 @@ local function create_environment(pos, mem, event)
|
|||||||
return unpack(pcr)
|
return unpack(pcr)
|
||||||
end
|
end
|
||||||
|
|
||||||
--Only input differs-this wrapper exists to catch certain outputs that shouldn't be caught by a (x)pcall
|
|
||||||
|
|
||||||
env.xpcall=function(...)
|
|
||||||
local pcr={xpcall(...)}
|
|
||||||
if not pcr[1] then
|
|
||||||
if pcr[2]~=timeout_error then
|
|
||||||
error(pcr[2])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return unpack(pcr)
|
|
||||||
end
|
|
||||||
|
|
||||||
return env
|
return env
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user