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:
Alex Szpakowski
2015-01-30 22:14:46 -04:00
parent 423e35fd76
commit 72f98b9c8f
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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