aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_graphics.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-05-29 12:39:52 +0800
committerchai <chaifix@163.com>2018-05-29 12:39:52 +0800
commite024e5a23c4f5c8e8fb02e7b03c8e9265ac6c1ef (patch)
treea19511ccb880db2f7dd99778efc956435474a518 /src/lua/graphics/luaopen_graphics.cpp
parent2add73bb54ce9376ffcd44ffd929049d3c430628 (diff)
Image改为工厂
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r--src/lua/graphics/luaopen_graphics.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}