Skip to content
Permalink
Browse files

Fix inability to change metadata using stack:to_table() (#5547)

  • Loading branch information
numberZero authored and SmallJoker committed Apr 12, 2017
1 parent 1399678 commit 83508277ce57720ee833bea125388a99cbe4e20d
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/script/lua_api/l_item.cpp
@@ -234,6 +234,8 @@ int LuaItemStack::l_to_table(lua_State *L)
for (StringMap::const_iterator it = fields.begin();
it != fields.end(); ++it) {
const std::string &name = it->first;
if (name.empty())
continue;
const std::string &value = it->second;
lua_pushlstring(L, name.c_str(), name.size());
lua_pushlstring(L, value.c_str(), value.size());

0 comments on commit 8350827

Please sign in to comment.