From a1c5b78dd2f8fe9ff06f748c460e6eb4eaf2a1ac Mon Sep 17 00:00:00 2001 From: emb <> Date: Sat, 28 Nov 2015 08:07:14 -0600 Subject: [PATCH] Fixing lua stack variables in lua script --- RetroFE/Source/Lua/LuaImage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/Lua/LuaImage.cpp b/RetroFE/Source/Lua/LuaImage.cpp index ecf1336..8f79f6a 100644 --- a/RetroFE/Source/Lua/LuaImage.cpp +++ b/RetroFE/Source/Lua/LuaImage.cpp @@ -45,7 +45,7 @@ int LuaImage::loadType(lua_State *l) { bool result = false; 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 name = luaL_checkstring(l, 4); @@ -73,7 +73,7 @@ int LuaImage::loadType(lua_State *l) lua_pushboolean(l, result); - return 2; + return 1; } #if 0