diff options
Diffstat (limited to 'util/debug.lua')
-rw-r--r-- | util/debug.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/debug.lua b/util/debug.lua index 2170a6d1..f70e20dd 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -95,7 +95,11 @@ function debug.traceback(thread, message, level) if level and type(message) ~= "string" then return nil, "invalid message"; elseif not level then - level = message or 2; + if type(message) == "number" then + level, message = message, nil; + else + level = 2; + end end message = message and (message.."\n") or ""; |