summaryrefslogtreecommitdiff
path: root/mesecons_luacontroller
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2016-03-14 12:51:57 +0100
committerJeija <norrepli@gmail.com>2016-03-14 12:51:57 +0100
commit72e513ecbdf8273c89d8a79b518d9d0fbedb3f90 (patch)
treebcc709a71b905f8360aa760b83a8fc0216fc2bfb /mesecons_luacontroller
parent1e77b193ddaaabc66a164c0213ea58559d2d863a (diff)
downloadmesecons-72e513ecbdf8273c89d8a79b518d9d0fbedb3f90.tar
mesecons-72e513ecbdf8273c89d8a79b518d9d0fbedb3f90.tar.gz
mesecons-72e513ecbdf8273c89d8a79b518d9d0fbedb3f90.tar.bz2
mesecons-72e513ecbdf8273c89d8a79b518d9d0fbedb3f90.tar.xz
mesecons-72e513ecbdf8273c89d8a79b518d9d0fbedb3f90.zip
Luacontroller: Put clearing debug hook before throwing error back in
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r--mesecons_luacontroller/init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 7d15e30..7df2bdc 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -209,6 +209,7 @@ end
-- the server. Therefore, limit max. length of generated string.
local function safe_string_rep(str, n)
if #str * n > mesecon.setting("luacontroller_string_rep_max", 64000) then
+ debug.sethook() -- Clear hook
error("string.rep: string length overflow", 2)
end
@@ -348,6 +349,7 @@ end
local function timeout()
+ debug.sethook() -- Clear hook
error("Code timed out!", 2)
end