Fixing lua stack variables in lua script

This commit is contained in:
emb
2015-11-28 08:07:14 -06:00
parent c924f3cc04
commit a1c5b78dd2

View File

@@ -45,7 +45,7 @@ int LuaImage::loadType(lua_State *l)
{ {
bool result = false; bool result = false;
Image *i = (Image *)lua_touserdata(l, 1); Image *i = (Image *)lua_touserdata(l, 1);
CollectionInfo *ci = (CollectionInfo *)luaL_checkinteger(l, 2); CollectionInfo *ci = (CollectionInfo *)lua_touserdata(l, 2);
std::string type = luaL_checkstring(l, 3); std::string type = luaL_checkstring(l, 3);
std::string name = luaL_checkstring(l, 4); std::string name = luaL_checkstring(l, 4);
@@ -73,7 +73,7 @@ int LuaImage::loadType(lua_State *l)
lua_pushboolean(l, result); lua_pushboolean(l, result);
return 2; return 1;
} }
#if 0 #if 0