From be2a788b056932c55b2e520360f458d30d7db34c Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 14 Jun 2014 13:53:26 +0100 Subject: [PATCH] Added support for non-string values to love.graphics.print() --- src/graphics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics.c b/src/graphics.c index 0d9e291..d2dbbb3 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -431,7 +431,8 @@ int l_graphics_circle(lua_State *L) { int l_graphics_print(lua_State *L) { - const char *str = luaL_checkstring(L, 1); + luaL_checkany(L, 1); + const char *str = luaL_tolstring(L, 1, NULL); int x = luaL_checkint(L, 2); int y = luaL_checkint(L, 3); font_blit(graphics_font, graphics_canvas->data, graphics_canvas->width,