Skip to content

Commit

Permalink
Fix removed debug funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz committed May 31, 2024
1 parent 80de956 commit dda25a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function Debug.object_type(object)
end

---Shows the given message if debug is on.
---@param position Position
---@param position MapPosition
---@param message string
function Debug.print_position(position, message)
Debug.print(format('%s %s', serialize(position), message))
Expand All @@ -147,6 +147,10 @@ end
-- @param func<function>
-- @return boolean
function Debug.is_closure(func)
if debug_getupvalue == nil then
return false
end

local i = 1
while true do
local n = debug_getupvalue(func, i)
Expand Down

0 comments on commit dda25a3

Please sign in to comment.