Skip to content
Permalink
Browse files

Luacontroller: Put clearing debug hook before throwing error back in

  • Loading branch information
Jeija committed Mar 14, 2016
1 parent 1e77b19 commit 72e513ecbdf8273c89d8a79b518d9d0fbedb3f90
Showing with 2 additions and 0 deletions.
  1. +2 −0 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

0 comments on commit 72e513e

Please sign in to comment.