From e024e5a23c4f5c8e8fb02e7b03c8e9265ac6c1ef Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 29 May 2018 12:39:52 +0800 Subject: =?UTF-8?q?Image=E6=94=B9=E4=B8=BA=E5=B7=A5=E5=8E=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/graphics/luaopen_graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lua/graphics') diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 2b6031b..0d06aca 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -71,7 +71,7 @@ namespace lua fs->read(f, &b); Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_IMAGE, sizeof(Proxy)); - Image* img = new Image((const char*)b.data, b.size); + Image* img = Image::createImage(b.data, b.size); proxy->bind(img); return 1; } -- cgit v1.1-26-g67d0