From 8585c92b7d0744a1f1a39c872cf5096621161b6c Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Aug 2018 14:21:56 +0800 Subject: *update --- src/lua/graphics/luaopen_Font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua/graphics/luaopen_Font.cpp') diff --git a/src/lua/graphics/luaopen_Font.cpp b/src/lua/graphics/luaopen_Font.cpp index 8585d46..341af87 100644 --- a/src/lua/graphics/luaopen_Font.cpp +++ b/src/lua/graphics/luaopen_Font.cpp @@ -19,13 +19,13 @@ namespace lua static int l_box(lua_State* L) { Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_GRAPHICS_FONT, sizeof(Proxy)); - Font* font = (Font*)proxy->object; + Ref& ref = proxy->getRef(); const char* text = luax_checkstring(L, 2); int fheight = luax_checknumber(L, 3); int spacing = luax_checknumber(L, 4); int lheight = luax_checknumber(L, 5); int w, h; - font->box(text, fheight, lheight, spacing, &w, &h); + (*ref).box(text, fheight, lheight, spacing, &w, &h); luax_pushnumber(L, w); luax_pushnumber(L, h); return 2; -- cgit v1.1-26-g67d0