aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_graphics.cpp
diff options
context:
space:
mode:
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;
}