mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
love's overloaded love.graphics.print and love.graphics.printf functions now use proper tail calls, which fixes the filename and backtrace given if those functions cause an error.
This commit is contained in:
@@ -1276,14 +1276,14 @@ do
|
||||
love.graphics.print = function (...)
|
||||
love.graphics.getFont() -- make sure we have a font
|
||||
love.graphics.print = _print
|
||||
love.graphics.print(...)
|
||||
return love.graphics.print(...)
|
||||
end
|
||||
|
||||
local _printf = love.graphics.printf
|
||||
love.graphics.printf = function (...)
|
||||
love.graphics.getFont() -- make sure we have a font
|
||||
love.graphics.printf = _printf
|
||||
love.graphics.printf(...)
|
||||
return love.graphics.printf(...)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user