Skip to content

Commit

Permalink
Luacontroller: Put clearing debug hook before throwing error back in
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeija committed Mar 14, 2016
1 parent 1e77b19 commit 72e513e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesecons_luacontroller/init.lua
Expand Up @@ -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

Expand Down Expand Up @@ -348,6 +349,7 @@ end


local function timeout()
debug.sethook() -- Clear hook
error("Code timed out!", 2)
end

Expand Down

0 comments on commit 72e513e

Please sign in to comment.