Skip to content

Commit

Permalink
Fix inability to change metadata using stack:to_table() (#5547)
Browse files Browse the repository at this point in the history
  • Loading branch information
numberZero authored and SmallJoker committed Apr 12, 2017
1 parent 1399678 commit 8350827
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/script/lua_api/l_item.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 8350827

Please sign in to comment.