Skip to content

Commit 72e513e

Browse files
committed
Luacontroller: Put clearing debug hook before throwing error back in
1 parent 1e77b19 commit 72e513e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mesecons_luacontroller/init.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ end
209209
-- the server. Therefore, limit max. length of generated string.
210210
local function safe_string_rep(str, n)
211211
if #str * n > mesecon.setting("luacontroller_string_rep_max", 64000) then
212+
debug.sethook() -- Clear hook
212213
error("string.rep: string length overflow", 2)
213214
end
214215

@@ -348,6 +349,7 @@ end
348349

349350

350351
local function timeout()
352+
debug.sethook() -- Clear hook
351353
error("Code timed out!", 2)
352354
end
353355

0 commit comments

Comments
 (0)