Skip to content

Commit

Permalink
CSM: Fix itemstack:get_meta() 'metadata' indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Sep 14, 2019
1 parent 23677be commit b0baa69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/script/cpp_api/s_security.cpp
Expand Up @@ -243,6 +243,7 @@ void ScriptApiSecurity::initializeSecurityClient()
"rawset",
"select",
"setfenv",
// getmetatable can be used to escape the sandbox
"setmetatable",
"tonumber",
"tostring",
Expand Down
2 changes: 2 additions & 0 deletions src/script/scripting_client.cpp
Expand Up @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_client.h"
#include "lua_api/l_env.h"
#include "lua_api/l_item.h"
#include "lua_api/l_itemstackmeta.h"
#include "lua_api/l_minimap.h"
#include "lua_api/l_modchannels.h"
#include "lua_api/l_particles_local.h"
Expand Down Expand Up @@ -67,6 +68,7 @@ ClientScripting::ClientScripting(Client *client):
void ClientScripting::InitializeModApi(lua_State *L, int top)
{
LuaItemStack::Register(L);
ItemStackMetaRef::Register(L);
StorageRef::Register(L);
LuaMinimap::Register(L);
NodeMetaRef::RegisterClient(L);
Expand Down

0 comments on commit b0baa69

Please sign in to comment.